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); |