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

Unified Diff: src/heap/mark-compact.cc

Issue 1632913003: [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips ports Created 4 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/heap-inl.h ('k') | src/heap/slots-buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 3442eeef668d1611739f576e64129d16999ba42f..eeb9d7a095004dae0ac9b548d168e427c77b8386 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3665,6 +3665,12 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
UpdatePointersAfterEvacuation();
+ // Give pages that are queued to be freed back to the OS. Note that filtering
+ // slots only handles old space (for unboxed doubles), and thus map space can
+ // still contain stale pointers. We only free the chunks after pointer updates
+ // to still have access to page headers.
+ heap()->FreeQueuedChunks();
+
{
GCTracer::Scope gc_scope(heap()->tracer(),
GCTracer::Scope::MC_EVACUATE_CLEAN_UP);
@@ -3979,10 +3985,6 @@ void MarkCompactCollector::SweepSpaces() {
// Deallocate unmarked large objects.
heap_->lo_space()->FreeUnmarkedObjects();
- // Give pages that are queued to be freed back to the OS. Invalid store
- // buffer entries are already filter out. We can just release the memory.
- heap()->FreeQueuedChunks();
-
if (FLAG_print_cumulative_gc_stat) {
heap_->tracer()->AddSweepingTime(heap_->MonotonicallyIncreasingTimeInMs() -
start_time);
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/slots-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698