[src]

Module std::rt::stack

Rust stack-limit management

Currently Rust uses a segmented-stack-like scheme in order to detect stack overflow for rust tasks. In this scheme, the prologue of all functions are preceded with a check to see whether the current stack limits are being exceeded.

This module provides the functionality necessary in order to manage these stack limits (which are stored in platform-specific locations). The functions here are used at the borders of the task lifetime in order to manage these limits.

This function is an unstable module because this scheme for stack overflow detection is not guaranteed to continue in the future. Usage of this module is discouraged unless absolutely necessary.

pub static RED_ZONE: uint = 20 * 1024  
get_sp_limit

The counterpart of the function above, this function will fetch the current stack limit stored in TLS.

record_sp_limit

Records the current limit of the stack as specified by end.

record_stack_bounds