Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef INCLUDE_DART_API_H_ | 5 #ifndef INCLUDE_DART_API_H_ |
| 6 #define INCLUDE_DART_API_H_ | 6 #define INCLUDE_DART_API_H_ |
| 7 | 7 |
| 8 /** \mainpage Dart Embedding API Reference | 8 /** \mainpage Dart Embedding API Reference |
| 9 * | 9 * |
| 10 * Dart is a class-based programming language for creating structured | 10 * Dart is a class-based programming language for creating structured |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1803 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? | 1803 // TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? |
| 1804 | 1804 |
| 1805 // --- Profiling support ---- | 1805 // --- Profiling support ---- |
| 1806 | 1806 |
| 1807 // External pprof support for gathering and dumping symbolic | 1807 // External pprof support for gathering and dumping symbolic |
| 1808 // information that can be used for better profile reports for | 1808 // information that can be used for better profile reports for |
| 1809 // dynamically generated code. | 1809 // dynamically generated code. |
| 1810 DART_EXPORT void Dart_InitPprofSupport(); | 1810 DART_EXPORT void Dart_InitPprofSupport(); |
| 1811 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1811 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 1812 | 1812 |
| 1813 // --- Misc ---- | |
| 1814 | |
| 1815 /** | |
| 1816 * The Dart VM uses zone allocation for temporary structures. Zones | |
| 1817 * support very fast allocation of small chunks of memory. The chunks | |
| 1818 * cannot be deallocated individually, but instead zones support | |
| 1819 * deallocating all chunks in one fast operation. | |
| 1820 * | |
| 1821 * This function makes it possible for the embedder to allocate | |
| 1822 * temporary data in the VMs zone allocator. | |
| 1823 * | |
| 1824 * Zone allocation is possible: | |
| 1825 * 1. when inside a scope where local handles can be allocated | |
| 1826 * 2. when processing a message from a native port. | |
| 1827 * | |
| 1828 * \param size Size of the memory to allocate. | |
| 1829 * | |
| 1830 * \return A pointer to the allocated memory. NULL if allocation | |
| 1831 * failed. Failure might due to is no current VM zone. | |
| 1832 */ | |
| 1833 DART_EXPORT uint8_t* Dart_ZoneAllocate(intptr_t size); | |
|
turnidge
2012/02/16 17:54:56
I would rename this to Dart_ScopeAllocate and move
Søren Gjesse
2012/02/17 07:43:09
Done.
| |
| 1834 | |
| 1813 #endif // INCLUDE_DART_API_H_ | 1835 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |