summaryrefslogtreecommitdiff
path: root/lld/wasm/Symbols.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/wasm/Symbols.h')
-rw-r--r--lld/wasm/Symbols.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h
index c17b720a90fa..32e75a69c5f8 100644
--- a/lld/wasm/Symbols.h
+++ b/lld/wasm/Symbols.h
@@ -538,11 +538,14 @@ struct WasmSym {
// Symbol marking the end of the data and bss.
static DefinedData *dataEnd;
- // __heap_base
- // Symbol marking the end of the data, bss and explicit stack. Any linear
- // memory following this address is not used by the linked code and can
- // therefore be used as a backing store for brk()/malloc() implementations.
+ // __heap_base/__heap_end
+ // Symbols marking the beginning and end of the "heap". It starts at the end
+ // of the data, bss and explicit stack, and extends to the end of the linear
+ // memory allocated by wasm-ld. This region of memory is not used by the
+ // linked code, so it may be used as a backing store for `sbrk` or `malloc`
+ // implementations.
static DefinedData *heapBase;
+ static DefinedData *heapEnd;
// __wasm_init_memory_flag
// Symbol whose contents are nonzero iff memory has already been initialized.