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
diff --git a/libc/bionic/malloc_debug_common.c b/libc/bionic/malloc_debug_common.c
index 4105ab8..9333de9 100644
--- a/libc/bionic/malloc_debug_common.c
+++ b/libc/bionic/malloc_debug_common.c
@@ -195,9 +195,19 @@
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.