| Index: runtime/vm/zone.h
|
| ===================================================================
|
| --- runtime/vm/zone.h (revision 42760)
|
| +++ runtime/vm/zone.h (working copy)
|
| @@ -112,6 +112,15 @@
|
| // Delete all objects and free all memory allocated in the zone.
|
| void DeleteAll();
|
|
|
| + // Does not actually free any memory. Enables templated containers like
|
| + // BaseGrowableArray to use different allocators.
|
| + template <class ElementType>
|
| + void Free(ElementType* old_array, intptr_t len) {
|
| +#ifdef DEBUG
|
| + memset(old_array, kZapUninitializedByte, len * sizeof(ElementType));
|
| +#endif
|
| + }
|
| +
|
| #if defined(DEBUG)
|
| // Dump the current allocated sizes in the zone object.
|
| void DumpZoneSizes();
|
| @@ -149,7 +158,8 @@
|
|
|
| friend class StackZone;
|
| friend class ApiZone;
|
| - template<typename T, typename B> friend class BaseGrowableArray;
|
| + template<typename T, typename B, typename Allocator>
|
| + friend class BaseGrowableArray;
|
| DISALLOW_COPY_AND_ASSIGN(Zone);
|
| };
|
|
|
|
|