Expand description
Memory Manager
This module provides memory management for the GameCube recompiler runtime. It handles address translation, memory reads/writes, and bulk operations.
§Memory Map
GameCube uses a flat memory model with the following regions:
- 0x80000000 - 0x817FFFFF: Main RAM (24MB)
- 0xCC000000 - 0xCFFFFFFF: ARAM (16MB audio RAM)
- 0x80000000 - 0x807FFFFF: Locked cache (8MB, overlaps with main RAM)
§Memory Optimizations
- All hot-path functions use
#[inline(always)]for address translation - Read/write functions use
#[inline]for performance - Explicit type annotations to reduce compiler inference overhead
- Bulk operations use optimized copy_from_slice for non-overlapping ranges
§Address Translation
GameCube uses physical addresses directly. Main RAM is mapped at 0x80000000, so we subtract this base address to get the RAM offset.
Structs§
- Memory
Manager - Memory manager for GameCube memory operations.