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

Method resize

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

Sets the size of this reservation to `capacity`

(&self, capacity: usize)

Source from the content-addressed store, hash-verified

438
439 /// Sets the size of this reservation to `capacity`
440 pub fn resize(&self, capacity: usize) {
441 let size = self.size.load(atomic::Ordering::Relaxed);
442 match capacity.cmp(&size) {
443 Ordering::Greater => self.grow(capacity - size),
444 Ordering::Less => self.shrink(size - capacity),
445 _ => {}
446 }
447 }
448
449 /// Try to set the size of this reservation to `capacity`
450 pub fn try_resize(&self, capacity: usize) -> Result<()> {

Callers 15

update_batchMethod · 0.45
merge_batchMethod · 0.45
internMethod · 0.45
scalarized_internMethod · 0.45
vectorized_internMethod · 0.45
partition_iterMethod · 0.45
extend_zeroMethod · 0.45
lookup_join_hashmapFunction · 0.45
update_internal_stateMethod · 0.45

Calls 4

loadMethod · 0.45
cmpMethod · 0.45
growMethod · 0.45
shrinkMethod · 0.45

Tested by

no test coverage detected