#include <MRCMisc/exports.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
◆ MR_int64_t
◆ MR_PassBy
◆ MR_uint64_t
◆ MR_PassBy
Enumerator |
---|
MR_PassBy_DefaultConstruct | |
MR_PassBy_Copy | |
MR_PassBy_Move | |
MR_PassBy_DefaultArgument | |
MR_PassBy_NoObject | |
◆ MR_Alloc()
MRC_API void * MR_Alloc |
( |
size_t | num_bytes | ) |
|
Allocates n
bytes of memory, which can then be freed using MR_Free()
.
◆ MR_AllocArray()
MRC_API void * MR_AllocArray |
( |
size_t | num_bytes | ) |
|
Allocates n
bytes of memory, which can then be freed using MR_FreeArray()
. For all purposes this is equivalent to MR_Alloc()
and MR_Free()
, but the deallocation functions are not interchangable. This is a bit weird, but we have to have separate deallocation functions for arrays and non-arrays, because ASAN complains otherwise. So the allocation functions must be provided separately for both too.
◆ MR_Free()
Deallocates memory that was previously allocated with MR_Alloc()
. Does nothing if the pointer is null.
◆ MR_FreeArray()
MRC_API void MR_FreeArray |
( |
void * | ptr | ) |
|
Deallocates memory that was previously allocated with MR_AllocArray()
. Does nothing if the pointer is null.