Files
android_development/tutorials/MoarRam/README.txt
Ben Cheng f9e0f5b7cf Add "Force a Double Free" button to stress test the tools.
Change-Id: I52bf2f42c9a6040ac345248473d7184b7266f511
2013-09-16 12:12:51 -07:00

18 lines
884 B
Plaintext

This is a simple app that can be used as a tutorial or reference benchmark
for the development of the DDMS native heap tracker feature. It contains 3
unique paths to allocate heap chunks:
1) Java_com_android_benchmark_moarram_MainActivity_add32ByteBlocksNative in
foo.c (libmoarram-foo.so). Each invocation will allocate 32 bytes.
2) Java_com_android_benchmark_moarram_MainActivity_add2MByteBlocksNative in
bar.c (libmoarram-bar.so). Each invocation will allocate 2M bytes.
3) Java_com_android_benchmark_moarram_MainActivity_addVariableSizedBlocksNative
in baz.c (libmoarram-baz.so). Each invocation will allocate 17 or 71 bytes,
depending on the active button in a radio group.
Each allocation can be freed by clicking the corresponding free button in the
UI.
NOTE 09/16/2013
A new feature is added to force a double free. Both debug libc and Valgrind can capture it.