summaryrefslogtreecommitdiff
path: root/runtime/gc/allocator/dlmalloc.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-11-03 21:36:10 -0800
committer Andreas Gampe <agampe@google.com> 2014-11-04 18:40:08 -0800
commit277ccbd200ea43590dfc06a93ae184a765327ad0 (patch)
treed89712e93da5fb2748989353c9ee071102cf3f33 /runtime/gc/allocator/dlmalloc.cc
parentad17d41841ba1fb177fb0bf175ec0e9f5e1412b3 (diff)
ART: More warnings
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
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;