Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
MemoryPool in datafusion::execution::memory_pool - Rust
[go: Go Back, main page]

pub trait MemoryPool: Send + Sync + Debug {
    fn grow(&self, reservation: &MemoryReservation, additional: usize);
    fn shrink(&self, reservation: &MemoryReservation, shrink: usize);
    fn try_grow(
        &self,
        reservation: &MemoryReservation,
        additional: usize
    ) -> Result<()>; fn reserved(&self) -> usize; fn register(&self, _consumer: &MemoryConsumer) { ... } fn unregister(&self, _consumer: &MemoryConsumer) { ... } }
Expand description

The pool of memory on which MemoryReservation record their memory reservations

Required Methods§

Infallibly grow the provided reservation by additional bytes

This must always succeed

Infallibly shrink the provided reservation by shrink bytes

Attempt to grow the provided reservation by additional bytes

On error the allocation will not be increased in size

Return the total amount of memory reserved

Provided Methods§

Registers a new MemoryConsumer

Note: Subsequent calls to Self::grow must be made to reserve memory

Records the destruction of a MemoryReservation with MemoryConsumer

Note: Prior calls to Self::shrink must be made to free any reserved memory

Implementors§