mfunyu / malloc

Find out the workings behind optimum memory management and recode it, as well as free and realloc.
2 stars 0 forks source link

Restart #1

Closed mfunyu closed 11 months ago

mfunyu commented 11 months ago
$> make test
TINY: 0x7f5f2469f000 ~ 0x7f5f2469f090 (144 bytes)
----------------+--+----+
 0x7f5f2469f000 |  | 0 | (32 -> 0x20)
----------------+--+----+
----------------+------------------------+----+
 0x7f5f2469f030 | ---------------------- | 22 | (32 -> 0x20)
----------------+------------------------+----+
----------------+-----------------------+----+
 0x7f5f2469f060 | +++++++++++++++++++++ | 21 | (32 -> 0x20)
----------------+-----------------------+----+
Chunk Free
----------------+-------------+----------------+----------------+
 0x7f5f2469f000 |  32 ( 0x20) |            0x0 |            0x0 | 
----------------+-------------+----------------+----------------+

SMALL: 0x7f5f1e367000 ~ 0x7f5f1e367000 (0 bytes)
LARGE: 0x0 ~ NA (NA)