Create configuration for memory-constrained environments
()
| 167 | |
| 168 | /// Create configuration for memory-constrained environments |
| 169 | pub fn memory_constrained() -> Self { |
| 170 | let mut config = Self::default(); |
| 171 | config.max_memory_bytes = 1024 * 1024 * 128; // 128MB total |
| 172 | config.l1_config.max_memory_bytes = 1024 * 1024 * 32; // 32MB |
| 173 | config.l1_config.max_entries = 500; |
| 174 | config.l2_config.max_memory_bytes = 1024 * 1024 * 64; // 64MB |
| 175 | config.l2_config.max_entries = 2000; |
| 176 | config.l3_config.max_memory_bytes = 1024 * 1024 * 32; // 32MB |
| 177 | config.l3_config.max_entries = 5000; |
| 178 | config.compression_enabled = true; |
| 179 | config |
| 180 | } |
| 181 | |
| 182 | /// Validate the configuration |
| 183 | pub fn validate(&self) -> Result<(), String> { |
nothing calls this directly
no outgoing calls
no test coverage detected