diff options
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 |
commit | 277ccbd200ea43590dfc06a93ae184a765327ad0 (patch) | |
tree | d89712e93da5fb2748989353c9ee071102cf3f33 /runtime/gc/allocator/dlmalloc.h | |
parent | ad17d41841ba1fb177fb0bf175ec0e9f5e1412b3 (diff) | |
download | android_art-277ccbd200ea43590dfc06a93ae184a765327ad0.tar.gz android_art-277ccbd200ea43590dfc06a93ae184a765327ad0.tar.bz2 android_art-277ccbd200ea43590dfc06a93ae184a765327ad0.zip |
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.h')
-rw-r--r-- | runtime/gc/allocator/dlmalloc.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/gc/allocator/dlmalloc.h b/runtime/gc/allocator/dlmalloc.h index c7ecbc83ce..0e91a4372c 100644 --- a/runtime/gc/allocator/dlmalloc.h +++ b/runtime/gc/allocator/dlmalloc.h @@ -17,6 +17,8 @@ #ifndef ART_RUNTIME_GC_ALLOCATOR_DLMALLOC_H_ #define ART_RUNTIME_GC_ALLOCATOR_DLMALLOC_H_ +#include <cstdint> + // Configure dlmalloc for mspaces. // Avoid a collision with one used in llvm. #undef HAVE_MMAP @@ -28,7 +30,10 @@ #define ONLY_MSPACES 1 #define MALLOC_INSPECT_ALL 1 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" #include "../../bionic/libc/upstream-dlmalloc/malloc.h" +#pragma GCC diagnostic pop #ifdef HAVE_ANDROID_OS // Define dlmalloc routines from bionic that cannot be included directly because of redefining @@ -47,4 +52,16 @@ extern "C" void DlmallocMadviseCallback(void* start, void* end, size_t used_byte extern "C" void DlmallocBytesAllocatedCallback(void* start, void* end, size_t used_bytes, void* arg); extern "C" void DlmallocObjectsAllocatedCallback(void* start, void* end, size_t used_bytes, void* arg); +namespace art { +namespace gc { +namespace allocator { + +// Callback from dlmalloc when it needs to increase the footprint. Must be implemented somewhere +// else (currently dlmalloc_space.cc). +void* ArtDlMallocMoreCore(void* mspace, intptr_t increment); + +} // namespace allocator +} // namespace gc +} // namespace art + #endif // ART_RUNTIME_GC_ALLOCATOR_DLMALLOC_H_ |