custom_mem_alloc · C compiled to WebAssembly
Every button calls the real my_malloc, my_calloc or my_free from src/my_allocator.c. The map is redrawn from the allocator's own print_heap_metadata() after each call.
These abort, exactly as they do natively. The page then restarts the module, the way a crashed process would be restarted.
| pointer | requested | block |
|---|
nothing allocated
The workload from bench/workload.h: random allocate and free across 256 slots, every block filled and verified before it is freed. Compared against Emscripten's own malloc.
| allocator | ns / op | M ops / s | failed |
|---|