Skip to content

Commit

Permalink
MemoryReservation exposes MemoryConsumer (#8000)
Browse files Browse the repository at this point in the history
... as a getter method.
  • Loading branch information
milenkovicm authored Oct 31, 2023
1 parent 27e64ae commit 747cb50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions datafusion/execution/src/memory_pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ impl MemoryReservation {
self.size
}

/// Returns [MemoryConsumer] for this [MemoryReservation]
pub fn consumer(&self) -> &MemoryConsumer {
&self.registration.consumer
}

/// Frees all bytes from this reservation back to the underlying
/// pool, returning the number of bytes freed.
pub fn free(&mut self) -> usize {
Expand Down

0 comments on commit 747cb50

Please sign in to comment.