pub unsafe extern "C" fn SteamNetworkingSockets_SetCustomMemoryAllocator(
    pfn_malloc: Option<unsafe extern "C" fn(s: size_t) -> *mut c_void>,
    pfn_free: Option<unsafe extern "C" fn(p: *mut c_void)>,
    pfn_realloc: Option<unsafe extern "C" fn(p: *mut c_void, s: size_t) -> *mut c_void>
)
Expand description

Custom memory allocation methods. If you call this, you MUST call it exactly once, before calling any other API function. Most allocations will pass through these, especially all allocations that are per-connection. A few allocations might still go to the default CRT malloc and operator new. To use this, you must compile the library with STEAMNETWORKINGSOCKETS_ENABLE_MEM_OVERRIDE