Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1344)

Unified Diff: src/spaces.cc

Issue 12313131: Shrinking of PagedSpace is done only by sweeper. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/spaces.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index ac1d187237b939c3bf5572a7ccddf8d24bad8778..3adb2e3553ec77e19b4ee7e992ff215ad3be9608 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -1081,36 +1081,6 @@ void PagedSpace::ReleasePage(Page* page) {
}
-void PagedSpace::ReleaseAllUnusedPages() {
- PageIterator it(this);
- while (it.has_next()) {
- Page* page = it.next();
- if (!page->WasSwept()) {
- if (page->LiveBytes() == 0) ReleasePage(page);
- } else {
- HeapObject* obj = HeapObject::FromAddress(page->area_start());
- if (obj->IsFreeSpace() &&
- FreeSpace::cast(obj)->size() == AreaSize()) {
- // Sometimes we allocate memory from free list but don't
- // immediately initialize it (e.g. see PagedSpace::ReserveSpace
- // called from Heap::ReserveSpace that can cause GC before
- // reserved space is actually initialized).
- // Thus we can't simply assume that obj represents a valid
- // node still owned by a free list
- // Instead we should verify that the page is fully covered
- // by free list items.
- FreeList::SizeStats sizes;
- free_list_.CountFreeListItems(page, &sizes);
- if (sizes.Total() == AreaSize()) {
- ReleasePage(page);
- }
- }
- }
- }
- heap()->FreeQueuedChunks();
-}
-
-
#ifdef DEBUG
void PagedSpace::Print() { }
#endif
« no previous file with comments | « src/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698