1.2.1
Public Attributes | List of all members
nb_buffer_memory_context Struct Reference

A structure containing memory-related pointers. More...

#include <buffer.h>

Public Attributes

nb_alloc_fn alloc_fn
 
nb_realloc_fn realloc_fn
 
nb_free_fn free_fn
 
nb_copy_fn copy_fn
 
nb_move_fn move_fn
 
void * context
 

Detailed Description

A structure containing memory-related pointers.

This is only useful if you have your own allocator or custom memory management.

See also
nb_init_advanced
nb_alloc_fn
nb_realloc_fn
nb_free_fn
nb_copy_fn
nb_move_fn

Member Data Documentation

◆ alloc_fn

nb_alloc_fn nb_buffer_memory_context::alloc_fn

A function to allocate a memory block. It needs to have the same semantics of malloc

◆ realloc_fn

nb_realloc_fn nb_buffer_memory_context::realloc_fn

A function to reallocate a memory block. It needs to have the same semantics of realloc

◆ free_fn

nb_free_fn nb_buffer_memory_context::free_fn

A function to release a memory block allocated by alloc_fn or realloc_fn. Needs to have the same semantics of free

◆ copy_fn

nb_copy_fn nb_buffer_memory_context::copy_fn

A function to copy non-overlapping data from a block to another. It needs to have the same semantics of memcpy

◆ move_fn

nb_move_fn nb_buffer_memory_context::move_fn

A function to copy possibly overlapping data from a block to another. It needs to have the same semantics of memmove

◆ context

void* nb_buffer_memory_context::context

A pointer to a user-data that will be passed in every memory-related call


The documentation for this struct was generated from the following file: