diff options
author | Dan Albert <danalbert@google.com> | 2014-06-14 01:04:31 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-06-14 01:04:31 +0000 |
commit | e5fdaa4f9d102461a4d8a865e6ca84666893b9e7 (patch) | |
tree | c17c2b67e2f12161e67f9b337c9cdc11bd8eab5f /tests/malloc_test.cpp | |
parent | a04d2bc28e7d7fcaf34ad71e4a6608a13cf84197 (diff) | |
download | android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.tar.gz android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.tar.bz2 android_bionic-e5fdaa4f9d102461a4d8a865e6ca84666893b9e7.zip |
Revert "Backing this one out since the counterpart needs to be sent upstream."
This reverts commit a04d2bc28e7d7fcaf34ad71e4a6608a13cf84197.
Change-Id: I1b49165ca5d4bafdba7948818256a6167a363aca
Diffstat (limited to 'tests/malloc_test.cpp')
-rw-r--r-- | tests/malloc_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp index ed98f15d3..d70136496 100644 --- a/tests/malloc_test.cpp +++ b/tests/malloc_test.cpp @@ -22,6 +22,10 @@ #include <malloc.h> #include <unistd.h> +#if defined(__BIONIC__) +#include <libc/bionic/malloc_debug_common.h> +#endif + TEST(malloc, malloc_std) { // Simple malloc test. void *ptr = malloc(100); @@ -291,6 +295,10 @@ TEST(malloc, realloc_overflow) { free(ptr); } +#if defined(HAVE_DEPRECATED_MALLOC_FUNCS) +extern "C" void* pvalloc(size_t); +extern "C" void* valloc(size_t); + TEST(malloc, pvalloc_std) { size_t pagesize = sysconf(_SC_PAGESIZE); void* ptr = pvalloc(100); @@ -315,3 +323,4 @@ TEST(malloc, valloc_std) { TEST(malloc, valloc_overflow) { ASSERT_EQ(NULL, valloc(SIZE_MAX)); } +#endif |