Reduce default stack size from 256kb to 81kb

This is the same as Musl Libc. Please note it only applies to threads.
This commit is contained in:
Justine Tunney 2024-07-19 14:14:08 -07:00
parent c697133a2d
commit 1029dcc597
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 6 additions and 5 deletions

View file

@ -1,18 +1,19 @@
#ifdef _COSMO_SOURCE
#ifndef COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
#define COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
#include "libc/runtime/runtime.h"
/**
* Returns preferred size and alignment of thread stack.
*/
#define GetStackSize() 262144
#define GetStackSize() 81920
/**
* Returns preferred stack guard size.
*
* This is the max cpu page size of supported architectures.
*/
#define GetGuardSize() 16384
#define GetGuardSize() __pagesize
/**
* Makes program stack executable if declared, e.g.