alloc method

int alloc(
  1. int byteCount
)

Allocates byteCount bytes of scratch heap, freed on releaseAll.

Implementation

int alloc(int byteCount) {
  if (_released) throw StateError('WasmArena already released');
  final p = module.malloc(byteCount);
  _allocations.add(p);
  return p;
}