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

Unified Diff: runtime/vm/zone.cc

Issue 2651273004: Fixed issue where initial 1KB zone buffer was not being accounted for when tracking thread zone me… (Closed)
Patch Set: Created 3 years, 11 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
« runtime/vm/thread.cc ('K') | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone.cc
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc
index b4c8e312cd1a4f08c6bb36d89361d174f99286a8..fc988a7ab230d946c00dba5b110b748a38418c0a 100644
--- a/runtime/vm/zone.cc
+++ b/runtime/vm/zone.cc
@@ -98,6 +98,10 @@ Zone::Zone()
handles_(),
previous_(NULL) {
ASSERT(Utils::IsAligned(position_, kAlignment));
+ Thread* current = Thread::Current();
+ if (current != NULL) {
+ current->IncrementMemoryUsage(kInitialChunkSize);
+ }
#ifdef DEBUG
// Zap the entire initial buffer.
memset(initial_buffer_.pointer(), kZapUninitializedByte,
@@ -110,6 +114,10 @@ Zone::~Zone() {
if (FLAG_trace_zones) {
DumpZoneSizes();
}
+ Thread* current = Thread::Current();
+ if (current != NULL) {
+ current->DecrementMemoryUsage(kInitialChunkSize);
+ }
DeleteAll();
}
« runtime/vm/thread.cc ('K') | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698