summaryrefslogtreecommitdiffstats
path: root/runtime/gc/space/bump_pointer_space.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/space/bump_pointer_space.h')
-rw-r--r--runtime/gc/space/bump_pointer_space.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/gc/space/bump_pointer_space.h b/runtime/gc/space/bump_pointer_space.h
index 3ab5df4..ecfeae5 100644
--- a/runtime/gc/space/bump_pointer_space.h
+++ b/runtime/gc/space/bump_pointer_space.h
@@ -43,6 +43,7 @@ class BumpPointerSpace FINAL : public ContinuousMemMapAllocSpace {
// guaranteed to be granted, if it is required, the caller should call Begin on the returned
// space to confirm the request was granted.
static BumpPointerSpace* Create(const std::string& name, size_t capacity, byte* requested_begin);
+ static BumpPointerSpace* CreateFromMemMap(const std::string& name, MemMap* mem_map);
// Allocate num_bytes, returns nullptr if the space is full.
mirror::Object* Alloc(Thread* self, size_t num_bytes, size_t* bytes_allocated,
@@ -92,11 +93,8 @@ class BumpPointerSpace FINAL : public ContinuousMemMapAllocSpace {
return nullptr;
}
- // Madvise the memory back to the OS.
- void Clear() OVERRIDE;
-
- // Reset the pointer to the start of the space.
- void Reset() OVERRIDE LOCKS_EXCLUDED(block_lock_);
+ // Reset the space to empty.
+ void Clear() OVERRIDE LOCKS_EXCLUDED(block_lock_);
void Dump(std::ostream& os) const;
@@ -113,6 +111,9 @@ class BumpPointerSpace FINAL : public ContinuousMemMapAllocSpace {
return Begin() == End();
}
+ bool CanMoveObjects() const OVERRIDE {
+ return true;
+ }
bool Contains(const mirror::Object* obj) const {
const byte* byte_obj = reinterpret_cast<const byte*>(obj);