#include <OffscreenGecko/geckomem.h>
Public Member Functions | |
void * | Alloc (size_t size) |
Allocate some memory using Gecko's memory allocator. | |
void * | Clone (const void *p, size_t size) |
Allocate some memory using Gecko's memory allocator and copy some data into into it. | |
void | Free (void *p) |
Free memory allocated using Gecko's memory allocator. | |
GeckoMem (WrappedType *obj) | |
GeckoMem & | operator= (const GeckoMem &other) |
void * | Realloc (void *p, size_t size) |
Reallocate a block of memory allocated with Gecko's memory allocator with a new size. |
Using it is sometimes required when handing memory back to Gecko (e.g. from custom class implementations).
OSGK::GeckoMem::GeckoMem | ( | WrappedType * | obj | ) | [inline, explicit] |
void* OSGK::GeckoMem::Alloc | ( | size_t | size | ) | [inline] |
Allocate some memory using Gecko's memory allocator.
size | Amount of memory to allocate. |
void* OSGK::GeckoMem::Clone | ( | const void * | p, | |
size_t | size | |||
) | [inline] |
Allocate some memory using Gecko's memory allocator and copy some data into into it.
p | Data to copy. | |
size | Amount of memory to allocate and size of data to copy. |
void OSGK::GeckoMem::Free | ( | void * | p | ) | [inline] |
Free memory allocated using Gecko's memory allocator.
p | Block of memory to free. |
void* OSGK::GeckoMem::Realloc | ( | void * | p, | |
size_t | size | |||
) | [inline] |
Reallocate a block of memory allocated with Gecko's memory allocator with a new size.
p | Block of memory to reallocate. | |
size | New amount of memory. |