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

Function test_try_allocate

graphlite/src/exec/memory_budget.rs:398–406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

396
397 #[test]
398 fn test_try_allocate() {
399 let budget = MemoryBudget::new(1000);
400
401 assert!(budget.try_allocate(500));
402 assert_eq!(budget.allocated(), 500);
403
404 assert!(!budget.try_allocate(600)); // Would exceed limit
405 assert_eq!(budget.allocated(), 500); // No change
406 }
407
408 #[test]
409 fn test_available_memory() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected