Add present bytes when recording allocations.
When an allocation is freed, add information about the total
present bytes in the allocation that can be used to tell the
usage of allocations. This also applies to realloc operations
that free the previous pointer.
Add new unit tests for this functionality.
Test: All unit tests pass.
Change-Id: Id3a253e4beb1c7342711137a2bf7ebed4e25d973
diff --git a/libc/malloc_debug/Android.bp b/libc/malloc_debug/Android.bp
index 5d61801..1864138 100644
--- a/libc/malloc_debug/Android.bp
+++ b/libc/malloc_debug/Android.bp
@@ -135,6 +135,7 @@
"tests/log_fake.cpp",
"tests/libc_fake.cpp",
"tests/malloc_debug_config_tests.cpp",
+ "tests/malloc_debug_record_data_tests.cpp",
"tests/malloc_debug_unit_tests.cpp",
],