65# if defined(PAGE_SIZE)
67# define BU_PAGE_SIZE PAGE_SIZE
70# define BU_PAGE_SIZE 4096
208BU_EXPORT
extern int bu_shmget(
int *shmid,
char **shared_memory,
int key,
size_t size);
224#define BU_GET(_ptr, _type) _ptr = (_type *)bu_heap_get(sizeof(_type))
226#define BU_GET(_ptr, _type) _ptr = (_type *)bu_calloc(1, sizeof(_type), #_type " (BU_GET) " CPP_FILELINE)
238#define BU_PUT(_ptr, _type) *(uint8_t *)(_type *)(_ptr) = 0; bu_heap_put(_ptr, sizeof(_type)); _ptr = NULL
240#define BU_PUT(_ptr, _type) do { *(uint8_t *)(_type *)(_ptr) = 0; bu_free(_ptr, #_type " (BU_PUT) " CPP_FILELINE); _ptr = NULL; } while (0)
248#define BU_ALLOC(_ptr, _type) _ptr = (_type *)bu_calloc(1, sizeof(_type), #_type " (BU_ALLOC) " CPP_FILELINE)
254#define BU_FREE(_ptr, _type) do { bu_free(_ptr, #_type " (BU_FREE) " CPP_FILELINE); _ptr = (_type *)NULL; } while (0)
Header file for the BRL-CAD common definitions.
void * bu_realloc(void *ptr, size_t siz, const char *str)
void * bu_malloc(size_t siz, const char *str)
int bu_malloc_len_roundup(int nbytes)
void bu_pool_delete(struct bu_pool *pool)
void * bu_heap_get(size_t sz)
void bu_heap_put(void *ptr, size_t sz)
int bu_shmget(int *shmid, char **shared_memory, int key, size_t size)
void * bu_calloc(size_t nelem, size_t elsize, const char *str)
bu_heap_func_t bu_heap_log(bu_heap_func_t log)
int(* bu_heap_func_t)(const char *,...)
void * bu_pool_alloc(struct bu_pool *pool, size_t nelem, size_t elsize)
void bu_free(void *ptr, const char *str)
struct bu_pool * bu_pool_create(size_t block_size)
void float float int int int int float * size
Global registry of recognized magic numbers.
void bu_prmem(const char *str)
void bu_ck_malloc_ptr(void *ptr, const char *str)
int bu_mem_barriercheck(void)