MCPcopy Create free account
hub / github.com/apache/datafusion / test_new_empty

Function test_new_empty

datafusion/execution/src/memory_pool/mod.rs:586–597  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

584
585 #[test]
586 fn test_new_empty() {
587 let pool = Arc::new(GreedyMemoryPool::new(50)) as _;
588 let r1 = MemoryConsumer::new("r1").register(&pool);
589
590 r1.try_grow(20).unwrap();
591 let r2 = r1.new_empty();
592 r2.try_grow(5).unwrap();
593
594 assert_eq!(r1.size(), 20);
595 assert_eq!(r2.size(), 5);
596 assert_eq!(pool.reserved(), 25);
597 }
598
599 #[test]
600 fn test_take() {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
registerMethod · 0.45
try_growMethod · 0.45
new_emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…