mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
379cd77078
On Windows, mmap() now chooses addresses transactionally. It reduces the risk of badness when interacting with the WIN32 memory manager. We don't throw darts anymore. There is also no more retry limit, since we recover from mystery maps more gracefully. The subroutine for combining adjacent maps has been rewritten for clarity. The print maps subroutine is better This change goes to great lengths to perfect the stack overflow code. On Windows you can now longjmp() out of a crash signal handler. Guard pages previously weren't being restored properly by the signal handler. That's fixed, so on Windows you can now handle a stack overflow multiple times. Great thought has been put into selecting the perfect SIGSTKSZ constants so you can save sigaltstack() memory. You can now use kprintf() with 512 bytes of stack available. The guard pages beneath the main stack are now recorded in the memory manager. This change fixes getcontext() so it works right with the %rax register.
16 lines
452 B
C
16 lines
452 B
C
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_SS_H_
|
|
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SS_H_
|
|
COSMOPOLITAN_C_START_
|
|
|
|
extern const int SS_DISABLE;
|
|
extern const int _SIGSTKSZ;
|
|
extern const int _MINSIGSTKSZ;
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#define SIGSTKSZ 32768 /* just itself believed to be safe */
|
|
#define MINSIGSTKSZ 32768 /* xnu defines the highest minimum */
|
|
#define SS_ONSTACK 1
|
|
#define SS_DISABLE SS_DISABLE
|
|
|
|
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_SS_H_ */
|