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

Unified Diff: runtime/vm/zone.h

Issue 2570763002: Fixed bad calculations for determining total allocated size of a zone. (Closed)
Patch Set: Created 4 years 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/thread_test.cc ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone.h
diff --git a/runtime/vm/zone.h b/runtime/vm/zone.h
index 9cf29714e29bd2de0f39200fbfd78f485a5ed646..d73398bfe40588de5cf144578152612e4e6889bc 100644
--- a/runtime/vm/zone.h
+++ b/runtime/vm/zone.h
@@ -67,9 +67,7 @@ class Zone {
intptr_t SizeInBytes() const;
// Computes the amount of space used in the zone.
- intptr_t UsedSizeInBytes() const {
- return SizeInBytes() - (limit_ - position_);
- }
+ intptr_t CapacityInBytes() const;
// Structure for managing handles allocation.
VMHandles* handles() { return &handles_; }
@@ -185,7 +183,7 @@ class StackZone : public StackResource {
intptr_t SizeInBytes() const { return zone_.SizeInBytes(); }
// Computes the used space in the zone.
- intptr_t UsedSizeInBytes() const { return zone_.UsedSizeInBytes(); }
+ intptr_t CapacityInBytes() const { return zone_.CapacityInBytes(); }
Zone* GetZone() { return &zone_; }
« no previous file with comments | « runtime/vm/thread_test.cc ('k') | runtime/vm/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698