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

Unified Diff: src/zone-inl.h

Issue 12866: Fixed regexp zone issue (Closed)
Patch Set: Created 12 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 | « src/zone.cc ('k') | test/cctest/test-ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone-inl.h
diff --git a/src/zone-inl.h b/src/zone-inl.h
index 6e64c42cc2ae7e883e2ec16a3a58b05043d66b2f..fd66b643f673303e755009905203656a9fdbedfc 100644
--- a/src/zone-inl.h
+++ b/src/zone-inl.h
@@ -29,12 +29,14 @@
#define V8_ZONE_INL_H_
#include "zone.h"
+#include "v8-counters.h"
namespace v8 { namespace internal {
inline void* Zone::New(int size) {
ASSERT(AssertNoZoneAllocation::allow_allocation());
+ ASSERT(ZoneScope::nesting() > 0);
// Round up the requested size to fit the alignment.
size = RoundUp(size, kAlignment);
@@ -53,6 +55,12 @@ bool Zone::excess_allocation() {
}
+void Zone::adjust_segment_bytes_allocated(int delta) {
+ segment_bytes_allocated_ += delta;
+ Counters::zone_segment_bytes.Set(segment_bytes_allocated_);
+}
+
+
} } // namespace v8::internal
#endif // V8_ZONE_INL_H_
« no previous file with comments | « src/zone.cc ('k') | test/cctest/test-ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698