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

Unified Diff: src/zone-inl.h

Issue 53089: Fixed test memory leaks (Closed)
Patch Set: Created 11 years, 9 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: src/zone-inl.h
diff --git a/src/zone-inl.h b/src/zone-inl.h
index fd66b643f673303e755009905203656a9fdbedfc..69b9a0a21f1435fcc4df5e2ad2c2f55012382f2c 100644
--- a/src/zone-inl.h
+++ b/src/zone-inl.h
@@ -50,6 +50,12 @@ inline void* Zone::New(int size) {
}
+template <typename T>
+T* Zone::NewArray(int length) {
+ return static_cast<T*>(Zone::New(length * sizeof(T)));
+}
+
+
bool Zone::excess_allocation() {
return segment_bytes_allocated_ > zone_excess_limit_;
}

Powered by Google App Engine
This is Rietveld 408576698