readNativeHeapUsage function
Snapshot of NativeHeapUsage for the whole process.
Implementation
NativeHeapUsage readNativeHeapUsage() {
final out = calloc<Int64>(4);
try {
_jsNativeHeapUsage(out, 4);
return NativeHeapUsage(
arenaBytes: out[0],
inUseBytes: out[1],
freeBytes: out[2],
mmappedBytes: out[3],
);
} finally {
calloc.free(out);
}
}