nlib
|
Declares parameters that are initialized by nmalloc
. Set by defining nmalloc_get_settings
.
More...
#include "nn/nlib/heap/NMalloc.h"
Public Attributes | |
void * | addr |
Specifies a pointer to the beginning of the region used by nmalloc . | |
size_t | size |
Specifies the maximum amount of memory that can be used by nmalloc . You must specify a multiple of 4096 bytes. More... | |
unsigned int | heap_option |
Specifies the heap options. The default is 0 . More... | |
Declares parameters that are initialized by nmalloc
. Set by defining nmalloc_get_settings
.
nmalloc
and nfree
functions allocate memory efficiently by dividing the memory that was allocated initially into small chunks. Parameters like the amount of memory can be set by defining nmalloc_get_settings
and setting a value for the NMallocSettings
-type structure. NULL
value is specified in addr
, nmalloc
allocates memory from the memory space (the array etc.) specified in the addr
and size
member variables. If NULL
is specified in addr
and a non-zero value (multiple of 4096) is specified in size
, memory is allocated and freed using a function such as nlib_virtual_alloc
. NULL
is specified in addr
and 0
is specified in size
, nmalloc
is disabled. The default settings are { NULL, 0, 0 }
. © 2012-2017 Nintendo Co., Ltd. All rights reserved.