mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 03:08:31 +00:00
Be more lenient about stack memory
The new stack size is 256kb in order to compromise with llama.cpp's aggressive use of stack memory, which can't be easily patched. This change disables the dynamic alloca() and VLA warnings for now, plus frame sizes for individual functions may be <=50% of the stack size This only applies to code in the cosmo monorepo. Open source builds should already be using an 8mb stack by default, like everyone else
This commit is contained in:
parent
fec139f423
commit
f42089d5c6
2 changed files with 4 additions and 6 deletions
|
@ -756,10 +756,10 @@ typedef struct {
|
|||
#if __GNUC__ >= 6
|
||||
#pragma GCC diagnostic error "-Wnonnull-compare"
|
||||
#if defined(COSMO) && !defined(MODE_DBG) && !defined(STACK_FRAME_UNLIMITED)
|
||||
#pragma GCC diagnostic error "-Wframe-larger-than=16384"
|
||||
#pragma GCC diagnostic error "-Wframe-larger-than=131072"
|
||||
#if __GNUC__ >= 9
|
||||
#pragma GCC diagnostic error "-Walloca-larger-than=1024"
|
||||
#pragma GCC diagnostic error "-Wvla-larger-than=1024"
|
||||
// #pragma GCC diagnostic error "-Walloca-larger-than=1024"
|
||||
// #pragma GCC diagnostic error "-Wvla-larger-than=1024"
|
||||
#endif /* GCC 9+ */
|
||||
#endif /* STACK_FRAME_UNLIMITED */
|
||||
#elif __GNUC__ >= 9
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue