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

Unified Diff: src/heap.cc

Issue 8507038: Fix Heap::Shrink to ensure that it does not free pages that are still in use. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: get rid of last_unswept_page_, add comment about Heap::ReserveSpace Created 9 years, 1 month 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 | « no previous file | src/mark-compact.cc » ('j') | src/spaces.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 0cbe13f92fb26cdb730318ae56cde11cac517d23..be8dfecc0e67cac7e24270cbecf00e79558009f4 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -5609,8 +5609,11 @@ void Heap::TearDown() {
void Heap::Shrink() {
// Try to shrink all paged spaces.
PagedSpaces spaces;
- for (PagedSpace* space = spaces.next(); space != NULL; space = spaces.next())
+ for (PagedSpace* space = spaces.next();
+ space != NULL;
+ space = spaces.next()) {
space->ReleaseAllUnusedPages();
+ }
}
« no previous file with comments | « no previous file | src/mark-compact.cc » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698