pub struct GreedyMemoryPool { /* private fields */ }
Expand description
A MemoryPool
that implements a greedy first-come first-serve limit.
This pool works well for queries that do not need to spill or have
a single spillable operator. See FairSpillPool
if there are
multiple spillable operators that all will spill.
Implementations§
Source§impl GreedyMemoryPool
impl GreedyMemoryPool
Sourcepub fn new(pool_size: usize) -> GreedyMemoryPool
pub fn new(pool_size: usize) -> GreedyMemoryPool
Create a new pool that can allocate up to pool_size
bytes
Trait Implementations§
Source§impl Debug for GreedyMemoryPool
impl Debug for GreedyMemoryPool
Source§impl MemoryPool for GreedyMemoryPool
impl MemoryPool for GreedyMemoryPool
Source§fn grow(&self, _reservation: &MemoryReservation, additional: usize)
fn grow(&self, _reservation: &MemoryReservation, additional: usize)
Source§fn shrink(&self, _reservation: &MemoryReservation, shrink: usize)
fn shrink(&self, _reservation: &MemoryReservation, shrink: usize)
Infallibly shrink the provided
reservation
by shrink
bytesSource§fn try_grow(
&self,
reservation: &MemoryReservation,
additional: usize,
) -> Result<(), DataFusionError>
fn try_grow( &self, reservation: &MemoryReservation, additional: usize, ) -> Result<(), DataFusionError>
Source§fn register(&self, _consumer: &MemoryConsumer)
fn register(&self, _consumer: &MemoryConsumer)
Registers a new
MemoryConsumer
Read moreSource§fn unregister(&self, _consumer: &MemoryConsumer)
fn unregister(&self, _consumer: &MemoryConsumer)
Auto Trait Implementations§
impl !Freeze for GreedyMemoryPool
impl RefUnwindSafe for GreedyMemoryPool
impl Send for GreedyMemoryPool
impl Sync for GreedyMemoryPool
impl Unpin for GreedyMemoryPool
impl UnwindSafe for GreedyMemoryPool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more