summaryrefslogtreecommitdiff
path: root/tests/malloc_test.cpp
AgeCommit message (Collapse)Author
2014-06-12Put all allocation functions into dispatch table.Christopher Ferris
Implement these new functions for all of the debug malloc types. Fix a number of bugs in the debug malloc functions related to overflow conditions. Fix a bug in dlpvalloc due to an overflow condition. Fix various other bugs in the debug malloc functions. Add new tests for malloc functions. Bug: 11225066 Change-Id: Idf50f389603e2157645565bc15cd9365eec2e9dd
2014-05-20Support for jemalloc to replace dlmalloc.Christopher Ferris
To use jemalloc, add MALLOC_IMPL = jemalloc in a board config file and you get the new version automatically. Update the pthread_create_key tests since jemalloc uses a few keys. Add a new test to verify memalign works as expected. Bug: 981363 Change-Id: I16eb152b291a95bd2499e90492fc6b4bd7053836
2013-06-07Implement malloc_usable_size for debug impls.Christopher Ferris
- Implemented chk_memalign. - Fixed a few bugs in leak_memalign. - Implemented {leak,fill,check,qemu}_malloc_usable_size. - Make malloc_usable_size update at run time. - Add malloc_test.cpp as a small set of tests for the malloc debug routines. - Fix the qemu routines since it's been broken since it moved to C++. - Add support for the %u format to the out_vformat in libc_logging.cpp. This is used by the emulator code. Tested using the bionic-unit-tests with setprop libc.debug.malloc set to 1, 5, and 10. I tested as much as possible on the emulator, but tracing doesn't appear to be working properly. Bug: 6143477 Merge change from internal master. (cherry-picked from commit 3d594c258045783fc9e1956ce7a4d91e302f011e) Change-Id: I4ae00fffba82315a8c283f35893fd554460722fb