diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-04-07 23:13:17 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-04-07 23:13:17 +0000 |
commit | 476fe7c81c0d6b060be5cde4c44a2bb8b0b8ffd2 (patch) | |
tree | c1a1832b9e5d4a04aa4c0b63c0f5de9485a0f5d9 /runtime/gc/space/rosalloc_space.cc | |
parent | bc488164013071454329f66d056c370e10b19877 (diff) | |
parent | d9a88de76de4c81ad75340b824df64a68c739351 (diff) | |
download | art-476fe7c81c0d6b060be5cde4c44a2bb8b0b8ffd2.zip art-476fe7c81c0d6b060be5cde4c44a2bb8b0b8ffd2.tar.gz art-476fe7c81c0d6b060be5cde4c44a2bb8b0b8ffd2.tar.bz2 |
Merge "Implement rosalloc page trimming without suspending threads."
Diffstat (limited to 'runtime/gc/space/rosalloc_space.cc')
-rw-r--r-- | runtime/gc/space/rosalloc_space.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/gc/space/rosalloc_space.cc b/runtime/gc/space/rosalloc_space.cc index 012267b..5c5e7f8 100644 --- a/runtime/gc/space/rosalloc_space.cc +++ b/runtime/gc/space/rosalloc_space.cc @@ -222,6 +222,7 @@ extern "C" void* art_heap_rosalloc_morecore(allocator::RosAlloc* rosalloc, intpt } size_t RosAllocSpace::Trim() { + VLOG(heap) << "RosAllocSpace::Trim() "; { MutexLock mu(Thread::Current(), lock_); // Trim to release memory at the end of the space. @@ -229,10 +230,7 @@ size_t RosAllocSpace::Trim() { } // Attempt to release pages if it does not release all empty pages. if (!rosalloc_->DoesReleaseAllPages()) { - VLOG(heap) << "RosAllocSpace::Trim() "; - size_t reclaimed = 0; - InspectAllRosAlloc(DlmallocMadviseCallback, &reclaimed, false); - return reclaimed; + return rosalloc_->ReleasePages(); } return 0; } |