Chromium Code Reviews| 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_; |
| } |