nitroAlloc method
The module's <lib>_nitro_alloc — for buffers whose ownership transfers
to native code (the C side frees them with its own free).
size_t/void* are i32 on wasm32 — plain JS numbers, never BigInt.
Implementation
int nitroAlloc(int byteCount) {
final p = dartI64(call('${libName}_nitro_alloc', [byteCount.toJS]));
if (p == 0) {
throw ArgumentError('$libName: ${libName}_nitro_alloc($byteCount) failed');
}
return p;
}