Use bionic's dlmalloc 2.8.5.

Also fix free space computations for DDMS.

Change-Id: Icbc045b5461af89a0516f37f01acaaa815205348
diff --git a/src/dlmalloc.h b/src/dlmalloc.h
index e696f6e..b6759a0 100644
--- a/src/dlmalloc.h
+++ b/src/dlmalloc.h
@@ -17,30 +17,20 @@
 #ifndef ART_SRC_DLMALLOC_H_
 #define ART_SRC_DLMALLOC_H_
 
-#define NO_MALLINFO 1
+// Configure dlmalloc for mspaces.
 #define HAVE_MMAP 0
 #define HAVE_MREMAP 0
 #define HAVE_MORECORE 1
 #define MSPACES 1
+#define NO_MALLINFO 1
 #define ONLY_MSPACES 1
-#define USE_DL_PREFIX 1
 #define MALLOC_INSPECT_ALL 1
 
-// Only #include if we are not compiling dlmalloc.c (to avoid symbol redefinitions)
-#ifndef FOR_DLMALLOC_C
-#include "dlmalloc/malloc.h"
-#endif
+#include "../../bionic/libc/upstream-dlmalloc/malloc.h"
 
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t, void*), void* arg);
-
-#ifdef __cplusplus
-};  /* end of extern "C" */
-#endif
+// Define dlmalloc routines from bionic that cannot be included directly because of redefining
+// symbols from the include above.
+extern "C" void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t, void*), void* arg);
+extern "C" int  dlmalloc_trim(size_t);
 
 #endif  // ART_SRC_DLMALLOC_H_