diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-04-15 19:17:01 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-15 19:17:01 +0000 |
commit | ebc726a931fd76a83a7dcdd3cf3505cee387cead (patch) | |
tree | de3dd89b0d2bb405ee75bbf8ba9024f6ac0ca7b4 /runtime/gc | |
parent | c311d0c85e17773042daaa7a4abc58b3e3c0a0c1 (diff) | |
parent | c4d095bba4d2cbc63ca6ca85787122c0f3e131cf (diff) | |
download | art-ebc726a931fd76a83a7dcdd3cf3505cee387cead.zip art-ebc726a931fd76a83a7dcdd3cf3505cee387cead.tar.gz art-ebc726a931fd76a83a7dcdd3cf3505cee387cead.tar.bz2 |
Merge "Don't call SetFootprintLimit in CreateZygoteSpace."
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/space/malloc_space.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/runtime/gc/space/malloc_space.cc b/runtime/gc/space/malloc_space.cc index 8f81446..eaf14fb 100644 --- a/runtime/gc/space/malloc_space.cc +++ b/runtime/gc/space/malloc_space.cc @@ -180,11 +180,6 @@ ZygoteSpace* MallocSpace::CreateZygoteSpace(const char* alloc_space_name, bool l << "GrowthLimit " << growth_limit_ << "\n" << "Capacity " << Capacity(); SetGrowthLimit(RoundUp(size, kPageSize)); - SetFootprintLimit(RoundUp(size, kPageSize)); - - // TODO: Not hardcode these in? - const size_t starting_size = kPageSize; - const size_t initial_size = 2 * MB; // FIXME: Do we need reference counted pointers here? // Make the two spaces share the same mark bitmaps since the bitmaps span both of the spaces. VLOG(heap) << "Creating new AllocSpace: "; @@ -196,11 +191,11 @@ ZygoteSpace* MallocSpace::CreateZygoteSpace(const char* alloc_space_name, bool l UniquePtr<MemMap> mem_map(GetMemMap()->RemapAtEnd(end_, alloc_space_name, PROT_READ | PROT_WRITE, &error_msg)); CHECK(mem_map.get() != nullptr) << error_msg; - void* allocator = CreateAllocator(end_, starting_size, initial_size, capacity, low_memory_mode); + void* allocator = CreateAllocator(end_, starting_size_, initial_size_, capacity, low_memory_mode); // Protect memory beyond the initial size. - byte* end = mem_map->Begin() + starting_size; - if (capacity - initial_size > 0) { - CHECK_MEMORY_CALL(mprotect, (end, capacity - initial_size, PROT_NONE), alloc_space_name); + byte* end = mem_map->Begin() + starting_size_; + if (capacity > initial_size_) { + CHECK_MEMORY_CALL(mprotect, (end, capacity - initial_size_, PROT_NONE), alloc_space_name); } *out_malloc_space = CreateInstance(alloc_space_name, mem_map.release(), allocator, end_, end, limit_, growth_limit, CanMoveObjects()); |