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

Unified Diff: runtime/vm/clustered_snapshot.cc

Issue 2916173002: Avoid allocating a whole new page for two one-element arrays when finalizing the VM isolate. (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | runtime/vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/clustered_snapshot.cc
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 708ba428c604dd8e382f755f798521a0b8868db5..bd00047ffdd5bd3fa403a0383306bd3dfb5a6c6e 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -5302,6 +5302,10 @@ void Deserializer::ReadVMSnapshot() {
refs_ = NULL;
}
+ // Move remaining bump allocation space to the freelist so it used by C++
+ // allocations (e.g., FinalizeVMIsolate) before allocating new pages.
+ heap_->old_space()->AbandonBumpAllocation();
+
Symbols::InitOnceFromSnapshot(isolate());
Object::set_vm_isolate_snapshot_object_table(refs);
« no previous file with comments | « no previous file | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698