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

Unified Diff: runtime/vm/heap.cc

Issue 1703383002: - Do not repeatedly allocate and release Monitor objects. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | « runtime/vm/heap.h ('k') | runtime/vm/isolate_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index d7846a7f5a557ebf1c26020fedf5e0ed24abe9f8..8950958a85c12192cd229059c13bb24e7eae927d 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -31,6 +31,8 @@ Heap::Heap(Isolate* isolate,
intptr_t max_old_gen_words,
intptr_t max_external_words)
: isolate_(isolate),
+ barrier_(new Monitor()),
+ barrier_done_(new Monitor()),
new_space_(this, max_new_gen_semi_words, kNewObjectAlignmentOffset),
old_space_(this, max_old_gen_words, max_external_words),
read_only_(false),
@@ -48,6 +50,9 @@ Heap::Heap(Isolate* isolate,
Heap::~Heap() {
+ delete barrier_;
+ delete barrier_done_;
+
for (int sel = 0;
sel < kNumWeakSelectors;
sel++) {
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698