In this section, implementation of glibc's heap management functions will be discussed in depth. The analysis was done on glibc's source code dated 27th March 2017. The source is very well documented.
Apart from the source code, the matter presented is influenced by:
Before moving into the implementation, it is important to keep the following notes in mind:
INTERNAL_SIZE_T is used internally (which by default is equal to
Alignment is defined as
2 * (sizeof(size_t)).
MORECORE is defined as the routine to call to obtain more memory. By default it is defined as
Next, we shall study the different data types used internally, bins, chunks, and internals of the different functions used.
r2Con2016 Glibc Heap Analysis with radare2 video