Struct open_coroutine::Stack
source · pub struct Stack { /* private fields */ }
Expand description
Represents any kind of stack memory.
FixedSizeStack
as well as ProtectedFixedSizeStack
can be used to allocate actual stack space.
Implementations§
source§impl Stack
impl Stack
sourcepub fn top(&self) -> *mut c_void
pub fn top(&self) -> *mut c_void
Returns the top of the stack from which on it grows downwards towards bottom().
pub fn is_empty(&self) -> bool
sourcepub fn default_size() -> usize
pub fn default_size() -> usize
Returns a implementation defined default stack size.
This value can vary greatly between platforms, but is usually only a couple memory pages in size and enough for most use-cases with little recursion. It’s usually a better idea to specifiy an explicit stack size instead.