aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/malloc_debug_common.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2012-08-17 17:28:15 -0700
committerIan Rogers <irogers@google.com>2012-08-20 14:12:20 -0700
commit999089181ef60bb67e1a49f2cf6f4ec608a7caf8 (patch)
tree68b426388adc78040949e65282fd623d08b7644d /libc/bionic/malloc_debug_common.c
parent9417a80e48d3bba4bea814178aaa79b905ebab8c (diff)
downloadandroid_bionic-999089181ef60bb67e1a49f2cf6f4ec608a7caf8.tar.gz
android_bionic-999089181ef60bb67e1a49f2cf6f4ec608a7caf8.tar.bz2
android_bionic-999089181ef60bb67e1a49f2cf6f4ec608a7caf8.zip
Upgrade to dlmalloc 2.8.5.
Move dlmalloc code to upstream-dlmalloc to make pulling upstream changes easier. Declare pvalloc and malloc_usable_size routines present in malloc.h but with missing implementations. Remove other functions from malloc.h that have no implementation nor use in Android. Change-Id: Ia6472ec6cbebc9ad1ef99f4669de9d33fcc2efb4
Diffstat (limited to 'libc/bionic/malloc_debug_common.c')
-rw-r--r--libc/bionic/malloc_debug_common.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libc/bionic/malloc_debug_common.c b/libc/bionic/malloc_debug_common.c
index 4105ab842..9333de96c 100644
--- a/libc/bionic/malloc_debug_common.c
+++ b/libc/bionic/malloc_debug_common.c
@@ -195,9 +195,19 @@ struct mallinfo mallinfo()
return dlmallinfo();
}
-void* valloc(size_t bytes) {
- /* assume page size of 4096 bytes */
- return memalign( getpagesize(), bytes );
+size_t malloc_usable_size(void* mem)
+{
+ return dlmalloc_usable_size(mem);
+}
+
+void* valloc(size_t bytes)
+{
+ return dlvalloc(bytes);
+}
+
+void* pvalloc(size_t bytes)
+{
+ return dlpvalloc(bytes);
}
/* Support for malloc debugging.