Function std::rt::stack::record_sp_limit[src]

pub unsafe fn record_sp_limit(limit: uint)

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

This is stored in an OS-dependent location, likely inside of the thread local storage. The location that the limit is stored is a pre-ordained location because it's where LLVM has emitted code to check.

Note that this cannot be called under normal circumstances. This function is changing the stack limit, so upon returning any further function calls will possibly be triggering the morestack logic if you're not careful.

Also note that this and all of the inside functions are all flagged as "inline(always)" because they're messing around with the stack limits. This would be unfortunate for the functions themselves to trigger a morestack invocation (if they were an actual function call).