MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / large_object_fallback

Function large_object_fallback

nodedb/src/engine/kv/slab.rs:408–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

406
407 #[test]
408 fn large_object_fallback() {
409 let mut slab = SlabAllocator::new();
410
411 let big = vec![0xFF; 8192]; // > 4KB → large object.
412 let (h, l) = slab.alloc(&big);
413 assert!(is_large_handle(h));
414 assert_eq!(slab.get(h, l), &big);
415
416 slab.free(h, l);
417 }
418
419 #[test]
420 fn tier_grows_on_demand() {

Callers

nothing calls this directly

Calls 2

allocMethod · 0.45
freeMethod · 0.45

Tested by

no test coverage detected