This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Architecture Comparison: Stack vs Heap vs Hybrid | |
| **Goal:** Choose the optimal memory architecture for miniRT world storage based on performance, memory usage, and code complexity. | |
| ## Quick Comparison Table | |
| | Criteria | Pure Stack | Pure Heap | **Hybrid** | | |
| |----------|------------|-----------|------------| | |
| | **Memory (10 objects)** | 11.2 KB | ~1 KB | **1.8 KB** ✅ | | |
| | **Memory (100 objects)** | ❌ FAIL | ~14 KB | **~14 KB** ✅ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Architecture Comparison: Stack vs Heap vs Hybrid | |
| **Goal:** Choose the optimal memory architecture for miniRT world storage based on performance, memory usage, and code complexity. | |
| ## Quick Comparison Table | |
| | Criteria | Pure Stack | Pure Heap | **Hybrid** | | |
| |----------|------------|-----------|------------| | |
| | **Memory (10 objects)** | 11.2 KB | ~1 KB | **1.8 KB** ✅ | | |
| | **Memory (100 objects)** | ❌ FAIL | ~14 KB | **~14 KB** ✅ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Hybrid Architecture Flowchart | |
| **Concept:** Use embedded stack array for small objects, transition to heap only when needed. | |
| **Key Feature:** ⚙️ **Configurable HEAP_THRESHOLD** — tune the stack→heap boundary in `include/memory_config.h` (see [Hybrid Heap Transition](hybrid-heap-transition.md) for details). | |
| --- | |
| ## Configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Architecture Comparison: Stack vs Heap vs Hybrid | |
| **Goal:** Choose the optimal memory architecture for miniRT world storage based on performance, memory usage, and code complexity. | |
| ## Quick Comparison Table | |
| | Criteria | Pure Stack | Pure Heap | **Hybrid** | | |
| |----------|------------|-----------|------------| | |
| | **Memory (10 objects)** | 11.2 KB | ~1 KB | **1.8 KB** ✅ | | |
| | **Memory (100 objects)** | ❌ FAIL | ~14 KB | **~14 KB** ✅ | |