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

Unified Diff: runtime/vm/dart_api_state.h

Issue 226973003: Simpler, more consistent triggering of old GC; also, use external in policy. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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
Index: runtime/vm/dart_api_state.h
===================================================================
--- runtime/vm/dart_api_state.h (revision 35145)
+++ runtime/vm/dart_api_state.h (working copy)
@@ -215,8 +215,6 @@
if (SpaceForExternal() == Heap::kNew) {
SetExternalNewSpaceBit();
}
- // TODO(koda): On repeated/large external allocations for existing objects,
- // without any intervening normal allocation, GC will not trigger.
isolate->heap()->AllocateExternal(external_size(), SpaceForExternal());
}
@@ -229,8 +227,7 @@
// Called when the referent has moved, potentially between generations.
void UpdateRelocated(Isolate* isolate) {
if (IsSetNewSpaceBit() && (SpaceForExternal() == Heap::kOld)) {
- isolate->heap()->FreeExternal(external_size(), Heap::kNew);
- isolate->heap()->AllocateExternal(external_size(), Heap::kOld);
+ isolate->heap()->PromoteExternal(external_size());
ClearExternalNewSpaceBit();
}
}

Powered by Google App Engine
This is Rietveld 408576698