summaryrefslogtreecommitdiffstats
path: root/runtime/base
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2015-04-13 12:22:36 +0100
committerVladimir Marko <vmarko@google.com>2015-04-13 16:30:13 +0100
commit3481ba2c4e4f3aa80d8c6d50a9f85dacb56b508b (patch)
tree77551c0a6d060e5a3723ad35d2ab101038f9328a /runtime/base
parent095d209342420563becfec6676b46a6c6b839107 (diff)
downloadart-3481ba2c4e4f3aa80d8c6d50a9f85dacb56b508b.tar.gz
art-3481ba2c4e4f3aa80d8c6d50a9f85dacb56b508b.tar.bz2
art-3481ba2c4e4f3aa80d8c6d50a9f85dacb56b508b.zip
ART: Clean up includes.
Reduce dependencies to improve incremental build times. Break up circular dependency involving class_linker-inl.h. Change-Id: I4be742c5c2b5cd9855beea86630fd68aab76b0db
Diffstat (limited to 'runtime/base')
-rw-r--r--runtime/base/arena_allocator.cc5
-rw-r--r--runtime/base/arena_allocator.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/runtime/base/arena_allocator.cc b/runtime/base/arena_allocator.cc
index 59d38ad593..b53fa84f5c 100644
--- a/runtime/base/arena_allocator.cc
+++ b/runtime/base/arena_allocator.cc
@@ -20,6 +20,7 @@
#include "arena_allocator.h"
#include "logging.h"
+#include "mem_map.h"
#include "mutex.h"
#include "thread-inl.h"
#include <memcheck/memcheck.h>
@@ -141,6 +142,10 @@ MemMapArena::MemMapArena(size_t size, bool low_4gb) {
size_ = map_->Size();
}
+MemMapArena::~MemMapArena() {
+ // Destroys MemMap via std::unique_ptr<>.
+}
+
void MemMapArena::Release() {
if (bytes_allocated_ > 0) {
map_->MadviseDontNeedAndZero();
diff --git a/runtime/base/arena_allocator.h b/runtime/base/arena_allocator.h
index 3a86b61e1a..ab5968cfb5 100644
--- a/runtime/base/arena_allocator.h
+++ b/runtime/base/arena_allocator.h
@@ -22,7 +22,6 @@
#include "debug_stack.h"
#include "macros.h"
-#include "mem_map.h"
#include "mutex.h"
#include "utils.h"
@@ -33,6 +32,7 @@ class ArenaPool;
class ArenaAllocator;
class ArenaStack;
class ScopedArenaAllocator;
+class MemMap;
class MemStats;
template <typename T>
@@ -166,7 +166,7 @@ class MallocArena FINAL : public Arena {
class MemMapArena FINAL : public Arena {
public:
explicit MemMapArena(size_t size, bool low_4gb);
- virtual ~MemMapArena() { }
+ virtual ~MemMapArena();
void Release() OVERRIDE;
private: