| Index: src/zone.h
|
| diff --git a/src/zone.h b/src/zone.h
|
| index c7129ec4b06a50500ae5295aad35db3d3e7fc1df..9721b0724b9324e6b9063753b58bb042d426bca3 100644
|
| --- a/src/zone.h
|
| +++ b/src/zone.h
|
| @@ -61,7 +61,13 @@ class Zone {
|
| // Delete all objects and free all memory allocated in the Zone.
|
| static void DeleteAll();
|
|
|
| + // Returns true if more memory has been allocated in zones than
|
| + // the limit allows.
|
| + static inline bool excess_allocation();
|
| +
|
| private:
|
| + friend class Segment;
|
| +
|
| // All pointers returned from New() have this alignment.
|
| static const int kAlignment = kPointerSize;
|
|
|
| @@ -71,6 +77,13 @@ class Zone {
|
| // Never keep segments larger than this size in bytes around.
|
| static const int kMaximumKeptSegmentSize = 64 * KB;
|
|
|
| + // Report zone excess when allocation exceeds this limit.
|
| + static int zone_excess_limit_;
|
| +
|
| + // The number of bytes allocated in segments. Note that this number
|
| + // includes memory allocated from the OS but not yet allocated from
|
| + // the zone.
|
| + static int segment_bytes_allocated_;
|
|
|
| // The Zone is intentionally a singleton; you should not try to
|
| // allocate instances of the class.
|
|
|