Nyx Node
Loading...
Searching...
No Matches
Memory

Macros

#define buff_t   /*-*/ void *
 Alias for void *.
#define BUFF_t   const void *
 Alias for const void *.
#define str_t   /*-*/ char *
 Alias for char *.
#define STR_t   const char *
 Alias for const char *.

Functions

void nyx_memory_initialize (void)
 Initializes the memory subsystem.
bool nyx_memory_finalize (void)
 Finalizes the memory subsystem.
__NYX_ZEROABLE__ size_t nyx_memory_free (__NYX_NULLABLE__ buff_t buff)
 Similar to libc free except that it returns the amount of memory freed.
__NYX_NULLABLE__ buff_t nyx_memory_alloc (__NYX_ZEROABLE__ size_t size)
 Similar to libc malloc except that a memory overflow causes the node to stop.
__NYX_NULLABLE__ buff_t nyx_memory_realloc (__NYX_NULLABLE__ buff_t buff, __NYX_ZEROABLE__ size_t size)
 Similar to libc realloc except that a memory overflow causes the node to stop.
__NYX_NULLABLE__ str_t nyx_string_dup (__NYX_NULLABLE__ STR_t s)
 Similar to libc strdup.
__NYX_NULLABLE__ str_t nyx_string_ndup (__NYX_NULLABLE__ STR_t s, __NYX_ZEROABLE__ size_t n)
 Similar to libc strndup.

Detailed Description

Memory primitives with leak detection.

Function Documentation

◆ nyx_memory_finalize()

bool nyx_memory_finalize ( void )

Finalizes the memory subsystem.

Returns
true if there is no memory leak, false otherwise.

Definition at line 50 of file object.c.