There are numerous implementations of the new operator from one compiler to the next, plus there are many ways to allocate different types of memory, such as local or global, or in stack or in the heap.
Read about memory management on the platform where your question applies, and about the exact methods of memory allocation that you use.
Beside that, I can only tell you where memory pointer is allocated physically on the x86 platform, regardless of some high-level operators, if you are curious
And it goes like this...(no, u think u're ready?)
First of all, selector register
points at either GDT
] or LDT
], depending on its bit 2 status. Then the address register
points at either memory itself, in case of flat memory model, or page index + offset, in case of the virtual mode. The bottom line, memory is physically allocated in pages these days, and the swap flag is supported by the x86 processors, so it can trigger an interrupt wherever a task is trying to access a page marked as swapped and the handler loads it up. Yep, that old chestnut. And this is how it works in Windows too
Do you still want to know where your memory size is stored?
Memory size within a process is always virtual, not real, and it can be stored anywhere, as long as the supporting API knows how to deal with it. Welcome to the virtual age, my friend
P.S. It's not the size, mate, it's how you use it