|
20 | 20 | extern "C" {
|
21 | 21 | #endif
|
22 | 22 |
|
23 |
| -// Returns a pointer to a memory location that contains the heap DYNAMICTOP |
24 |
| -// variable (the end of the dynamic memory region) |
| 23 | +// Returns a pointer to a memory location that contains the current sbrk |
| 24 | +// location (which marks the end of the dynamic memory region used for malloc, |
| 25 | +// etc). |
25 | 26 | uintptr_t *emscripten_get_sbrk_ptr(void);
|
26 | 27 |
|
27 |
| -// Attempts to geometrically or linearly increase the heap so that it |
28 |
| -// grows to the new size of at least `requested_size` bytes. The heap size may |
29 |
| -// be overallocated, see src/settings.js variables MEMORY_GROWTH_GEOMETRIC_STEP, |
| 28 | +// Attempts to geometrically or linearly increase the size of the WebAssembly |
| 29 | +// memory (referred to as heap for legacy reason) so that its new size is at |
| 30 | +// least `requested_size` bytes. The size may be overallocated, see |
| 31 | +// src/settings.js variables MEMORY_GROWTH_GEOMETRIC_STEP, |
30 | 32 | // MEMORY_GROWTH_GEOMETRIC_CAP and MEMORY_GROWTH_LINEAR_STEP. This function
|
31 |
| -// cannot be used to shrink the size of the heap. |
| 33 | +// cannot be used to shrink the size of the memory. |
32 | 34 | int emscripten_resize_heap(size_t requested_size) EM_IMPORT(emscripten_resize_heap);
|
33 | 35 |
|
34 |
| -// Returns the current size of the WebAssembly heap. |
| 36 | +// Returns the current size of the WebAssembly memory (referred to as heap for |
| 37 | +// legacy reason). |
35 | 38 | size_t emscripten_get_heap_size(void);
|
36 | 39 |
|
37 |
| -// Returns the max size of the WebAssembly heap. |
| 40 | +// Returns the max size of the WebAssembly memory (referred to as heap for |
| 41 | +// legacy reason). |
38 | 42 | size_t emscripten_get_heap_max(void);
|
39 | 43 |
|
40 | 44 | // Direct access to the system allocator. Use these to access that underlying
|
|
0 commit comments