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

[bug] inf loop on many mallocs #27

Closed mfunyu closed 8 months ago

mfunyu commented 8 months ago
$> ./test/run_benchmark.sh
===== test11: time overhead =====
1 loops of 1000 mallocs and 500 free
-> 1000 mallocs, 500 frees

real    0m0.005s
user    0m0.002s
sys     0m0.000s

===== test11: time overhead =====
10 loops of 1000 mallocs and 500 free
-> 10000 mallocs, 5000 frees

real    0m0.017s
user    0m0.011s
sys     0m0.000s

===== test11: time overhead =====
100 loops of 1000 mallocs and 500 free
-> 100000 mallocs, 50000 frees
^C