man rmem (Fonctions bibliothèques) - memory allocation functions

NAME

rmem - memory allocation functions

SYNOPSIS

#include <roy.h>

void * rmem_alloc (size_t size);

void * rmem_alloc0 (size_t size);

void rmem_free (void *ptr);

void * rmem_realloc (void *ptr, size_t size);

void * rmem_new (type, int num);

void * rmem_new0 (type, int num);

DESCRIPTION

The rmem functions are basically just wrappers around malloc(3), free(3), and realloc(3). However, we have implemented a backend which allows you to detect various memory related problems. See rmdbg(3) for more details.

rmem_alloc allocates memory just like malloc(3).

rmem_alloc0 allocates memory, and returns it zero'd.

rmem_free frees allocated memory, allocated via any of these functions/macros.

rmem_realloc reallocates memory just like realloc(3).

rmem_new is a macro that allocates num number of types type.

rmem_new0 is a macro that allocates num number of types type, and zeros this memory before returning it.

SEE ALSO