MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / PyMemAllocator

Class PyMemAllocator

python3-sys/src/pymem.rs:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#[derive(Copy, Clone)]
35#[cfg(all(Py_3_4, not(Py_3_5), not(Py_LIMITED_API)))]
36pub struct PyMemAllocator {
37 pub ctx: *mut c_void,
38 pub malloc: Option<extern "C" fn(ctx: *mut c_void, size: size_t) -> *mut c_void>,
39 pub realloc:
40 Option<extern "C" fn(ctx: *mut c_void, ptr: *mut c_void, new_size: size_t) -> *mut c_void>,
41 pub free: Option<extern "C" fn(ctx: *mut c_void, ptr: *mut c_void) -> ()>,
42}
43
44#[repr(C)]
45#[derive(Copy, Clone)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected