Question about implementation of new/delete and new[]/delete[] in gnu gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I am using debian linux with gcc 4.7.2.

I am curious and want to educate myself about the particular implementations of the operators new, new[], delete and delete[].

Specifically, I was curious about what meta data is stored about the allocations (size/# of elements in the array case), and where that data is stored. I have the source for gcc-4.7.2 and I looked through it, but it was not obvious where to start. I guess I was expecting to see some sort of metadata structure placed in the heap right before the returned pointer but I didn't see anything like that, or at least it was not obvious to me if I was looking at it.

Does anyone know which source files contain the magic? Or better yet, can anyone point me to a design doc that describes the overall strategy?

Thanks!
Tim


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux