Used __builtin_wasm_memory_size(0) instead of having the Javascript code call init_mem with the initial page count. Added a simple <div> below the canvas that can hold any number of labels that can be filled/updated through jsSetLabel which lives in a new file misc_functions.js.
This commit is contained in:
@@ -26,7 +26,6 @@ _Noreturn void abort_msg(const char* message);
|
||||
// void* aligned_alloc(size_t numBytes, size_t alignmentSize);
|
||||
|
||||
//These are our own std-like functions for interacting with WebAssembly memory
|
||||
WASM_EXPORT(init_mem) void init_mem(size_t numInitialPages);
|
||||
void* grow_mem(size_t numBytes);
|
||||
size_t get_mem();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user