MCPcopy Index your code
hub / github.com/RustPython/RustPython / has_space

Method has_space

crates/vm/src/datastack.rs:74–77  ·  view source on GitHub ↗
(&self, size: usize)

Source from the content-addressed store, hash-verified

72 /// Check if the current chunk has at least `size` bytes available.
73 #[inline(always)]
74 pub fn has_space(&self, size: usize) -> bool {
75 let aligned_size = (size + ALIGN - 1) & !(ALIGN - 1);
76 (self.limit as usize).saturating_sub(self.top as usize) >= aligned_size
77 }
78
79 /// Allocate `size` bytes from the data stack.
80 ///

Callers 1

datastack_has_spaceMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected