EmscriptenStack

Constructors

Link copied to clipboard
constructor(exports: EmscriptenStackExports, rootLogger: Logger)

Properties

Link copied to clipboard
val emscriptenStackBase: WasmPtr<<Error class: unknown class>>

Returns the starting address of the stack. This is the address that the stack pointer would point to when no bytes are in use on the stack.

Link copied to clipboard
val emscriptenStackCurrent: WasmPtr<<Error class: unknown class>>

Returns the current stack pointer.

Link copied to clipboard
val emscriptenStackEnd: WasmPtr<<Error class: unknown class>>

Returns the end address of the stack. This is the address that the stack pointer would point to when the whole stack is in use. (The address pointed to by the end is not part of the stack itself). Note that the stack grows down so the address returned by emscriptenStackEnd is smaller than emscriptenStackBase.

Link copied to clipboard

Returns the number of free bytes left on the stack. This is required to be fast so that it can be called frequently.

Functions

Link copied to clipboard
Link copied to clipboard

Sets the current stack pointer to addr.

Link copied to clipboard

Sets the internal values reported by emscriptenStackBase and emscriptenStackEnd. This should only be used by low level libraries such as asyncify fibers.

Link copied to clipboard
Link copied to clipboard
fun stackCheckInit(memory: Memory)

Startup routine to initialize the stack.

Link copied to clipboard