aboutsummaryrefslogtreecommitdiffstats
path: root/tests/malloc_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implement malloc_info(3).Dan Albert2014-08-221-0/+50
| | | | | | | Expose jemalloc stats through the malloc_info(3) interface. Bug: 16874689 Change-Id: I4358ac283002e60ff161107028d1a3fb1e9afb0a
* Use a separate config.h for config like defines.Christopher Ferris2014-06-161-3/+1
| | | | | | | | | | This allows an easier way to share config parameters between unit tests and the bionic code. It also fixes a problem where the 32 bit bionic tests based on glibc, or the cts list executable did not have the pvalloc,valloc tests. Change-Id: Ib47942cb8a278252faa7498a6ef23e9578db544f
* Revert "Backing this one out since the counterpart needs to be sent upstream."Dan Albert2014-06-141-0/+9
| | | | | | This reverts commit a04d2bc28e7d7fcaf34ad71e4a6608a13cf84197. Change-Id: I1b49165ca5d4bafdba7948818256a6167a363aca
* Backing this one out since the counterpart needs to be sent upstream.Dan Albert2014-06-141-9/+0
| | | | | | This reverts commit 5ee320dd35fafc11eaf90c62198e08c6670e35b4. Change-Id: I1a9c6b06c3aca595f01c629f7649be743dc48e77
* Hides valloc(3)/pvalloc(3) on LP64.Dan Albert2014-06-131-0/+9
| | | | | | | | These were removed from POSIX 2004. Hides the header declarations for all targets, and hides the symbols for LP64. Bug: 13935372 Change-Id: Id592f67e9b7051517a05f536e1373b30162e669c
* Put all allocation functions into dispatch table.Christopher Ferris2014-06-121-23/+90
| | | | | | | | | | | | | | | | 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
* Support for jemalloc to replace dlmalloc.Christopher Ferris2014-05-201-1/+16
| | | | | | | | | | | | 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
* Implement malloc_usable_size for debug impls.Christopher Ferris2013-06-071-0/+235
- 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