Memory module
Contents
- Reference
Memory management utilities.
Files
- file bn_alignment.h
- file bn_config_ewram.h
- file bn_config_memory.h
- file bn_ewram_wait_state.h
- file bn_memory.h
Namespaces
- namespace bn
- Main Butano namespace.
- namespace bn::memory
- Memory related functions.
Functions
-
template<int Bytes>auto aligned(const void* pointer) -> bool constexpr
- Indicates if the given pointer is aligned to the given Bytes.
-
template<int Bytes, typename Type>auto aligned(const Type& reference) -> bool constexpr
- Indicates if the given reference to a Type object is aligned to the given Bytes.
Defines
- #define BN_CFG_EWRAM_WAIT_STATE
- #define BN_CFG_MEMORY_MAX_EWRAM_ALLOC_ITEMS
- #define BN_EWRAM_WAIT_STATE_2
- #define BN_EWRAM_WAIT_STATE_1
Function documentation
#include <bn_alignment.h>
template<int Bytes>
bool aligned(const void* pointer) constexpr
Indicates if the given pointer is aligned to the given Bytes.
#include <bn_alignment.h>
template<int Bytes, typename Type>
bool aligned(const Type& reference) constexpr
Indicates if the given reference to a Type object is aligned to the given Bytes.
Define documentation
#define BN_CFG_EWRAM_WAIT_STATE
#include <bn_config_ewram.h>
Specifies EWRAM access time in clock cycles.
Values not specified in BN_EWRAM_WAIT_STATE_* macros are not allowed.
#define BN_CFG_MEMORY_MAX_EWRAM_ALLOC_ITEMS
#include <bn_config_memory.h>
Specifies the maximum number of memory blocks that can be allocated in EWRAM with bn::
#define BN_EWRAM_WAIT_STATE_2
#include <bn_ewram_wait_state.h>
EWRAM access time is 2+1 clock cycles for sequential accesses.
#define BN_EWRAM_WAIT_STATE_1
#include <bn_ewram_wait_state.h>
EWRAM access time is 1+1 clock cycles for sequential accesses.
This wait states setting is not supported by the GBA Micro. Enabling it will not crash the GBA Micro though, it will just fall back to BN_