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
MemoryConsumer in datafusion::execution::memory_pool - Rust
[go: Go Back, main page]

Struct MemoryConsumer

Source
pub struct MemoryConsumer { /* private fields */ }
Expand description

A memory consumer is a named allocation traced by a particular MemoryReservation in a MemoryPool. All allocations are registered to a particular MemoryConsumer;

Each MemoryConsumer is identifiable by a process-unique id, and is therefor not cloneable, If you want a clone of a MemoryConsumer, you should look into MemoryConsumer::clone_with_new_id, but note that this MemoryConsumer may be treated as a separate entity based on the used pool, and is only guaranteed to share the name and inner properties.

For help with allocation accounting, see the proxy module.

Implementations§

Source§

impl MemoryConsumer

Source

pub fn new(name: impl Into<String>) -> MemoryConsumer

Create a new empty MemoryConsumer that can be grown using MemoryReservation

Source

pub fn clone_with_new_id(&self) -> MemoryConsumer

Returns a clone of this MemoryConsumer with a new unique id, which can be registered with a MemoryPool, This new consumer is separate from the original.

Source

pub fn id(&self) -> usize

Return the unique id of this MemoryConsumer

Source

pub fn with_can_spill(self, can_spill: bool) -> MemoryConsumer

Set whether this allocation can be spilled to disk

Source

pub fn can_spill(&self) -> bool

Returns true if this allocation can spill to disk

Source

pub fn name(&self) -> &str

Returns the name associated with this allocation

Source

pub fn register(self, pool: &Arc<dyn MemoryPool>) -> MemoryReservation

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

Trait Implementations§

Source§

impl Debug for MemoryConsumer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Hash for MemoryConsumer

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for MemoryConsumer

Source§

fn eq(&self, other: &MemoryConsumer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for MemoryConsumer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DynEq for T
where T: Eq + Any,

Source§

fn dyn_eq(&self, other: &(dyn Any + 'static)) -> bool

Source§

impl<T> DynHash for T
where T: Hash + Any,

Source§

fn dyn_hash(&self, state: &mut dyn Hasher)

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Ungil for T
where T: Send,