mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Fix C stack remaining check in MODE=tiny
This commit is contained in:
parent
bcdd5c5f74
commit
28b9d9f781
5 changed files with 11 additions and 7 deletions
|
@ -121,6 +121,13 @@ extern char ape_stack_align[] __attribute__((__weak__));
|
|||
vAddr; \
|
||||
})
|
||||
|
||||
/**
|
||||
* Returns true if at least `n` bytes of stack are available.
|
||||
*/
|
||||
#define HaveStackMemory(n) \
|
||||
(IsTiny() || \
|
||||
(intptr_t)__builtin_frame_address(0) >= GetStackAddr() + PAGESIZE * (n))
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* GNU ELF */
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue