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

Unified Diff: runtime/vm/heap.h

Issue 187113003: Track external allocated memory for weak persistent handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/heap.h
===================================================================
--- runtime/vm/heap.h (revision 33235)
+++ runtime/vm/heap.h (working copy)
@@ -102,6 +102,11 @@
return 0;
}
+ // Track external data. The 'ref' pointer is only used to determine which
+ // space to use. Non-heap and VM heap objects are charged to old space.
+ void AllocateExternal(intptr_t size, RawObject* ref);
Ivan Posva 2014/03/05 21:21:23 Do we allow non-heap objects (aka Smis) do be used
koda 2014/03/05 21:52:08 Yes, I believe we do. See my test WeakPersistentHa
+ void FreeExternal(intptr_t size, RawObject* ref);
+
// Heap contains the specified address.
bool Contains(uword addr) const;
bool NewContains(uword addr) const;
@@ -162,9 +167,10 @@
// Print heap sizes.
void PrintSizes() const;
- // Return amount of memory used and capacity in a space.
+ // Return amount of memory used and capacity in a space, including external.
intptr_t UsedInWords(Space space) const;
intptr_t CapacityInWords(Space space) const;
+ intptr_t ExternalAllocatedInWords(Space space) const;
Ivan Posva 2014/03/05 21:21:23 How about ExternalInWords?
koda 2014/03/05 21:52:08 Done.
// Return the amount of GCing in microseconds.
int64_t GCTimeInMicros(Space space) const;

Powered by Google App Engine
This is Rietveld 408576698