diff options
Diffstat (limited to 'src/libgreen/stack.rs')
| -rw-r--r-- | src/libgreen/stack.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libgreen/stack.rs b/src/libgreen/stack.rs index 6a5772ff628..cccf0ec6987 100644 --- a/src/libgreen/stack.rs +++ b/src/libgreen/stack.rs @@ -82,6 +82,11 @@ impl Stack { } } + /// Point to the last writable byte of the stack + pub fn guard(&self) -> *const uint { + (self.start() as uint + page_size()) as *const uint + } + /// Point to the low end of the allocated stack pub fn start(&self) -> *const uint { self.buf.as_ref().map(|m| m.data() as *const uint) |
