summaryrefslogtreecommitdiff
path: root/runtime/gc/allocator/dlmalloc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/allocator/dlmalloc.cc')
-rw-r--r--runtime/gc/allocator/dlmalloc.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/gc/allocator/dlmalloc.cc b/runtime/gc/allocator/dlmalloc.cc
index acff52d50d..8558f96730 100644
--- a/runtime/gc/allocator/dlmalloc.cc
+++ b/runtime/gc/allocator/dlmalloc.cc
@@ -19,8 +19,8 @@
#include "base/logging.h"
// ART specific morecore implementation defined in space.cc.
+static void* art_heap_morecore(void* m, intptr_t increment);
#define MORECORE(x) art_heap_morecore(m, x)
-extern "C" void* art_heap_morecore(void* m, intptr_t increment);
// Custom heap error handling.
#define PROCEED_ON_ERROR 0
@@ -31,12 +31,16 @@ static void art_heap_usage_error(const char* function, void* p);
// Ugly inclusion of C file so that ART specific #defines configure dlmalloc for our use for
// mspaces (regular dlmalloc is still declared in bionic).
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wredundant-decls"
#pragma GCC diagnostic ignored "-Wempty-body"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#include "../../../bionic/libc/upstream-dlmalloc/malloc.c"
-#pragma GCC diagnostic warning "-Wstrict-aliasing"
-#pragma GCC diagnostic warning "-Wempty-body"
+#pragma GCC diagnostic pop
+static void* art_heap_morecore(void* m, intptr_t increment) {
+ return ::art::gc::allocator::ArtDlMallocMoreCore(m, increment);
+}
static void art_heap_corruption(const char* function) {
LOG(::art::FATAL) << "Corrupt heap detected in: " << function;