image/svg+xml
struct malloc_heap
prev
prev
prev
prev
prev
prev
Free element header(struct malloc_elem, state = FREE)
Used element header(struct malloc_elem, state = BUSY)
size
Memseg 0
Memseg 1
prev
prev
next_free
next_free
free_head
prev
Dummy Elements:Size = 0State = BUSY
pad
Pad element header(struct malloc_elem, state = PAD)
Generic element pointers
Malloc element header:state = BUSYsize = <size>pad = <padsize>
size
Free / Unallocated data space
Pad element header:state = PADpad = padsize
Used / allocated data space
Padding / unavailable space