malloc_fn property
malloc/free are CDECL on Windows regardless of the default calling convention of the compiler, so ensure the hooks allow passing those functions directly.
Implementation
external ffi.Pointer<
ffi.NativeFunction<ffi.Pointer<ffi.Void> Function(ffi.Size sz)>
>
malloc_fn;