nu_malloc

Allocates bytes worth of memory.

export extern (C) @nogc nothrow @system pure
@weak
void*
nu_malloc
(
size_t bytes
)

Parameters

bytes size_t

How many bytes to allocate.

Return Value

Type: void*

Newly allocated memory or null on failure. To avoid a memory leak, free the memory with nu_free.

Notes: Given the implementation of nu_malloc and nu_free may be independent of the libc allocator, memory allocated with nu_malloc should always be freed with nu_free!

Meta