Commit graph

2 commits

Author SHA1 Message Date
Christopher Ferris
d86eb8665c Add support for M_PURGE_ALL.
This is a new mallopt option that will force purge absolutely
everything no matter how long it takes to purge.

Wrote a unit test for the new mallopt, and added a test to help
verify that new mallopt parameters do not conflict with each other.

Modified some benchmarks to use this new parameter so that we can
get better RSS data.

Added a new M_PURGE_ALL benchmark.

Bug: 243851006

Test: All unit tests pass.
Test: Ran changed benchmarks.
Change-Id: I1b46a5e6253538108e052d11ee46fd513568adec
2023-03-13 19:55:32 -07:00
Chia-hung Duan
a15d5c4f86 Add a malloc rss benchmark
The behavior of this benchmark includes three steps:
1. Use up to 16 MB by allocating blocks with given size in each thread.
2. Release the all blocks in random order.
3. Use up to 1.6 MB by allocating blocks with given size in each thread.

This is used to see how the allocator manages the free blocks and we can
measure the impact of randomization property used by the allocator.

Test: Run malloc-rss-benchmark $NUM_THREADS $ALLOC_SIZE

Change-Id: Ib68562996905839ee4367b1b059714e2325ca03e
2022-12-14 19:33:22 +00:00