Ben Cheng | 50172ca | 2013-05-10 13:37:56 -0700 | [diff] [blame] | 1 | This is a simple app that can be used as a tutorial or reference benchmark |
| 2 | for the development of the DDMS native heap tracker feature. It contains 3 |
| 3 | unique paths to allocate heap chunks: |
| 4 | |
| 5 | 1) Java_com_android_benchmark_moarram_MainActivity_add32ByteBlocksNative in |
| 6 | foo.c (libmoarram-foo.so). Each invocation will allocate 32 bytes. |
| 7 | 2) Java_com_android_benchmark_moarram_MainActivity_add2MByteBlocksNative in |
| 8 | bar.c (libmoarram-bar.so). Each invocation will allocate 2M bytes. |
| 9 | 3) Java_com_android_benchmark_moarram_MainActivity_addVariableSizedBlocksNative |
| 10 | in baz.c (libmoarram-baz.so). Each invocation will allocate 17 or 71 bytes, |
| 11 | depending on the active button in a radio group. |
| 12 | |
| 13 | Each allocation can be freed by clicking the corresponding free button in the |
| 14 | UI. |
Ben Cheng | f9e0f5b | 2013-09-16 12:12:51 -0700 | [diff] [blame] | 15 | |
| 16 | NOTE 09/16/2013 |
| 17 | A new feature is added to force a double free. Both debug libc and Valgrind can capture it. |