7 typedef enum vramAllocPos
10 VRAM_ALLOC_B =
BIT(1),
11 VRAM_ALLOC_ANY = VRAM_ALLOC_A | VRAM_ALLOC_B,
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
void * vramAlloc(size_t size)
Allocates a 0x80-byte aligned buffer.
void * vramMemAlign(size_t size, size_t alignment)
Allocates a buffer aligned to the given size.
void * vramMemAlignAt(size_t size, size_t alignment, vramAllocPos pos)
Allocates a buffer aligned to the given size in the given VRAM bank.
void * vramAllocAt(size_t size, vramAllocPos pos)
Allocates a 0x80-byte aligned buffer in the given VRAM bank.
u32 vramSpaceFree(void)
Gets the current VRAM free space.
void vramFree(void *mem)
Frees a buffer.
void * vramRealloc(void *mem, size_t size)
Reallocates a buffer.
size_t vramGetSize(void *mem)
Retrieves the allocated size of a buffer.