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

Unified Diff: src/heap.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/heap.h ('k') | src/spaces.h » ('j') | no next file with comments »
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 b6ef3f58dcadb70b735ac2914cd54464c77820ab..49c1692e63c8dfcecfce932bb13a6e0c02cbf6c7 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -591,7 +591,6 @@ void Heap::CollectAllAvailableGarbage(const char* gc_reason) {
mark_compact_collector()->SetFlags(kNoGCFlags);
new_space_.Shrink();
UncommitFromSpace();
- Shrink();
incremental_marking()->UncommitMarkingDeque();
}
@@ -789,11 +788,6 @@ void Heap::EnsureFromSpaceIsCommitted() {
if (new_space_.CommitFromSpaceIfNeeded()) return;
// Committing memory to from space failed.
- // Try shrinking and try again.
- Shrink();
- if (new_space_.CommitFromSpaceIfNeeded()) return;
-
- // Committing memory to from space failed again.
// Memory is exhausted and we will die.
V8::FatalProcessOutOfMemory("Committing semi space failed.");
}
@@ -822,7 +816,6 @@ void Heap::ClearJSFunctionResultCaches() {
}
-
void Heap::ClearNormalizedMapCaches() {
if (isolate_->bootstrapper()->IsActive() &&
!incremental_marking()->IsMarking()) {
@@ -6414,17 +6407,6 @@ void Heap::TearDown() {
}
-void Heap::Shrink() {
- // Try to shrink all paged spaces.
- PagedSpaces spaces(this);
- for (PagedSpace* space = spaces.next();
- space != NULL;
- space = spaces.next()) {
- space->ReleaseAllUnusedPages();
- }
-}
-
-
void Heap::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) {
ASSERT(callback != NULL);
GCPrologueCallbackPair pair(callback, gc_type);
« no previous file with comments | « src/heap.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698