MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / memory_constrained

Method memory_constrained

graphlite/src/cache/cache_config.rs:169–180  ·  view source on GitHub ↗

Create configuration for memory-constrained environments

()

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected