Commit graph

1 commit

Author SHA1 Message Date
Calin Culianu
de8d5b681f
Added the stand-alone C++ test program "heap_frag_test.cpp"
This is a small CLI program that attempts to fragment the heap by
allocating a bunch of random data from multiple threads.  It then
stops and asks the user to hit enter.

It prints memory usage for physical and virtual memory used by the
process, and at the end it compares the amount of memory still mapped
(even after deallocating all buffers).

It can be used as a crude way to estimate the efficiency of an allocator
and how good it is at releasing memory to the OS.
2020-08-28 23:28:03 +03:00