#[repr(C)]pub struct GLFWallocator {
pub allocate: GLFWallocatefun,
pub reallocate: GLFWreallocatefun,
pub deallocate: GLFWdeallocatefun,
pub user: *mut c_void,
}Expand description
@brief Custom heap memory allocator.
This describes a custom heap memory allocator for GLFW. To set an allocator, pass it to @ref glfwInitAllocator before initializing the library.
@sa @ref init_allocator @sa @ref glfwInitAllocator
@since Added in version 3.4.
@ingroup init
Fields§
§allocate: GLFWallocatefunThe memory allocation function. See @ref GLFWallocatefun for details about allocation function.
reallocate: GLFWreallocatefunThe memory reallocation function. See @ref GLFWreallocatefun for details about reallocation function.
deallocate: GLFWdeallocatefunThe memory deallocation function. See @ref GLFWdeallocatefun for details about deallocation function.
user: *mut c_voidThe user pointer for this custom allocator. This value will be passed to the allocator functions.
Trait Implementations§
Source§impl Clone for GLFWallocator
impl Clone for GLFWallocator
Source§fn clone(&self) -> GLFWallocator
fn clone(&self) -> GLFWallocator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GLFWallocator
impl Debug for GLFWallocator
impl Copy for GLFWallocator
Auto Trait Implementations§
impl Freeze for GLFWallocator
impl RefUnwindSafe for GLFWallocator
impl !Send for GLFWallocator
impl !Sync for GLFWallocator
impl Unpin for GLFWallocator
impl UnwindSafe for GLFWallocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more