diff options
author | Samuel Williams <[email protected]> | 2019-07-16 16:11:55 +1200 |
---|---|---|
committer | Samuel Williams <[email protected]> | 2019-07-18 20:54:55 +1200 |
commit | 001f187ed6539f320421d8893d2f3c8f584cc3a5 (patch) | |
tree | ce525733ca95a920083874cc50ee47084f1e687a /coroutine/ucontext | |
parent | 385ea910fc28f0e46c72669a260e44d4f3f37d9e (diff) |
Make fiber_pool more conservative on platforms with limited address space.
We use COROUTINE_LIMITED_ADDRESS_SPACE to select platforms where address
space is 32-bits or less. Fiber pool implementation enables more book
keeping, and reduces upper limits, in order to minimise address space
utilisation.
Diffstat (limited to 'coroutine/ucontext')
-rw-r--r-- | coroutine/ucontext/Context.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coroutine/ucontext/Context.h b/coroutine/ucontext/Context.h index bde9be302a..6cf16c8604 100644 --- a/coroutine/ucontext/Context.h +++ b/coroutine/ucontext/Context.h @@ -13,6 +13,10 @@ #define COROUTINE __attribute__((noreturn)) void +#if INTPTR_MAX <= INT32_MAX +#define COROUTINE_LIMITED_ADDRESS_SPACE +#endif + struct coroutine_context { ucontext_t state; |