How new/delete stores the internal info about the allocated buffer?
I am using C++ new/delete operators to allocate/deallocate the buffers. I think for each allocated buffer, there should be an additional info block stores the size and other info about the buffer. How to know more details about this info block? I need to override these two operators and find such an info block is useful to my implementation.
Thanks
Re: How new/delete stores the internal info about the allocated buffer?
To find the size of allocated buffers see your other question here http://forums.codeguru.com/showthrea...located-buffer
As far as I am aware other info re allocated memory is not available.
Re: How new/delete stores the internal info about the allocated buffer?
"there is no portable way to do so".
going into specific compilers there are ways by which you can get free store information or even go lower level and get OS heap management information.
none of those will typically work when custom allocators or overloaded operator new are in play.
Re: How new/delete stores the internal info about the allocated buffer?
Or alternatively, that may actually be the way you do get at it.
install your own global new/delete operators and do any sort of allocation tracking you want from there.