mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
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:
parent
c697133a2d
commit
1029dcc597
2 changed files with 6 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
// -*-mode:c++;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8-*-
|
// -*-mode:c++;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8-*-
|
||||||
// vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi
|
// vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi
|
||||||
#ifndef COSMOPOLITAN_CTL_STRINGVIEW_H_
|
#ifndef CTL_STRINGVIEW_H_
|
||||||
#define COSMOPOLITAN_CTL_STRINGVIEW_H_
|
#define CTL_STRINGVIEW_H_
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
|
|
||||||
namespace ctl {
|
namespace ctl {
|
||||||
|
@ -157,4 +157,4 @@ struct string_view
|
||||||
|
|
||||||
} // namespace ctl
|
} // namespace ctl
|
||||||
|
|
||||||
#endif // COSMOPOLITAN_CTL_STRINGVIEW_H_
|
#endif // CTL_STRINGVIEW_H_
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
#ifdef _COSMO_SOURCE
|
#ifdef _COSMO_SOURCE
|
||||||
#ifndef COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
|
#ifndef COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
|
||||||
#define COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
|
#define COSMOPOLITAN_LIBC_RUNTIME_STACK_H_
|
||||||
|
#include "libc/runtime/runtime.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns preferred size and alignment of thread stack.
|
* Returns preferred size and alignment of thread stack.
|
||||||
*/
|
*/
|
||||||
#define GetStackSize() 262144
|
#define GetStackSize() 81920
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns preferred stack guard size.
|
* Returns preferred stack guard size.
|
||||||
*
|
*
|
||||||
* This is the max cpu page size of supported architectures.
|
* This is the max cpu page size of supported architectures.
|
||||||
*/
|
*/
|
||||||
#define GetGuardSize() 16384
|
#define GetGuardSize() __pagesize
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes program stack executable if declared, e.g.
|
* Makes program stack executable if declared, e.g.
|
||||||
|
|
Loading…
Reference in a new issue