Struct async_wormhole::stack::EightMbStack [−][src]
pub struct EightMbStack(_);
A 8 Mb Stack.
On Unix platforms this will simply reserve 8 Mb of memory to be used as a stack (without a guard page). Mmap will be called with the MAP_NORESERVE flag to allow us to overcommit on stack allocations.
On Windows it will reserve 8 Mb of memory + 4 pages on top for the exception handler. Only the bottom of the stack will be marked as commited, while the rest will be reserved. This allows us to overcommit on stack allocations. The memory is specifically set up with guard pages in a way that Windows expect it to be, so that the OS can automatically grow and commit memory.
Even 8 Mb may sound like a lot on all modern operating systems only pages that have something written to consume physical memory, the rest is cheap virtual memory.
Trait Implementations
impl Drop for EightMbStack
[src]
impl Drop for EightMbStack
[src]impl Stack for EightMbStack
[src]
impl Stack for EightMbStack
[src]pub fn new() -> Result<EightMbStack, Error>
[src]
pub fn new() -> Result<EightMbStack, Error>
[src]Returns a new stack.
pub fn deallocation(&self) -> *mut usize
[src]
pub fn deallocation(&self) -> *mut usize
[src]Returns a pointer to the deallocation stack (a Windows construct).