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

Method register

datafusion/execution/src/memory_pool/mod.rs:339–348  ·  view source on GitHub ↗

Registers this [`MemoryConsumer`] with the provided [`MemoryPool`] returning a [`MemoryReservation`] that can be used to grow or shrink the memory reservation

(self, pool: &Arc<dyn MemoryPool>)

Source from the content-addressed store, hash-verified

337 /// Registers this [`MemoryConsumer`] with the provided [`MemoryPool`] returning
338 /// a [`MemoryReservation`] that can be used to grow or shrink the memory reservation
339 pub fn register(self, pool: &Arc<dyn MemoryPool>) -> MemoryReservation {
340 pool.register(&self);
341 MemoryReservation {
342 registration: Arc::new(SharedRegistration {
343 pool: Arc::clone(pool),
344 consumer: self,
345 }),
346 size: atomic::AtomicUsize::new(0),
347 }
348 }
349}
350
351/// A registration of a [`MemoryConsumer`] with a [`MemoryPool`].

Callers 6

test_splitFunction · 0.45
test_new_emptyFunction · 0.45
test_takeFunction · 0.45
test_try_shrinkFunction · 0.45
reserveMethod · 0.45

Calls 1

newFunction · 0.85

Tested by 5

test_splitFunction · 0.36
test_new_emptyFunction · 0.36
test_takeFunction · 0.36
test_try_shrinkFunction · 0.36