| Index: runtime/include/dart_api.h
|
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
|
| index d09cc842f9c563c54c43b097d18e3edf1b9dccf0..91ea07c68d6c1756358af4f4e7b74e9b06dff5e2 100755
|
| --- a/runtime/include/dart_api.h
|
| +++ b/runtime/include/dart_api.h
|
| @@ -1509,4 +1509,26 @@ DART_EXPORT Dart_Handle Dart_SetNativeResolver(
|
| DART_EXPORT void Dart_InitPprofSupport();
|
| DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
|
|
|
| +// --- Misc ----
|
| +
|
| +/**
|
| + * The Dart VM uses zone allocation for temporary structures. Zones
|
| + * support very fast allocation of small chunks of memory. The chunks
|
| + * cannot be deallocated individually, but instead zones support
|
| + * deallocating all chunks in one fast operation.
|
| + *
|
| + * This function makes it possible for the embedder to allocate
|
| + * temporary data in the VMs zone allocator.
|
| + *
|
| + * Zone allocation is possible:
|
| + * 1. when inside a scope where local handles can be allocated
|
| + * 2. when processing a message from a native port.
|
| + *
|
| + * \param size Size of the memory to allocate.
|
| + *
|
| + * \return A pointer to the allocated memory. NULL if allocation
|
| + * failed. Failure might due to is no current VM zone.
|
| + */
|
| +DART_EXPORT uint8_t* Dart_ZoneAllocate(intptr_t size);
|
| +
|
| #endif // INCLUDE_DART_API_H_
|
|
|