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

Unified Diff: runtime/vm/heap.cc

Issue 1433463002: Allocate some data structures in old instead of in new space. Early inlining bailout for native fun… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Spelling error Created 5 years, 1 month 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/flow_graph_inliner.cc ('k') | runtime/vm/isolate.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 038ea1b1d3fa3c25e81bbc445cffc9e6d0d6b5cb..0e0eeaf19b6e772ab82ceddec4cc374990714942 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -161,6 +161,7 @@ uword Heap::AllocatePretenured(intptr_t size) {
void Heap::AllocateExternal(intptr_t size, Space space) {
ASSERT(Thread::Current()->no_safepoint_scope_depth() == 0);
if (space == kNew) {
+ isolate()->AssertCurrentThreadIsMutator();
new_space_.AllocateExternal(size);
if (new_space_.ExternalInWords() > (FLAG_new_gen_ext_limit * MBInWords)) {
// Attempt to free some external allocation by a scavenge. (If the total
@@ -178,6 +179,7 @@ void Heap::AllocateExternal(intptr_t size, Space space) {
void Heap::FreeExternal(intptr_t size, Space space) {
if (space == kNew) {
+ isolate()->AssertCurrentThreadIsMutator();
new_space_.FreeExternal(size);
} else {
ASSERT(space == kOld);
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698