Re:SBCL Fibers – Lightweight Cooperative Threads
by zelphirkalt on Sunday March 15, 2026 @06:00AM
(#47385843)
I remember Joe Armstrong saying something like 2kB in his talks, for an Erlang process. That's 1/128 of 256kB.
Re:SBCL Fibers – Lightweight Cooperative Threads
by my-next-account on Sunday March 15, 2026 @02:24PM
(#47390259)
2KiB is a peculiar size. Typical page size is 4KiB, and you probably want to allocate two pages - one for the stack and one for a guard page for stack overflow protection. That means that a fibers' minimal size ought to be 8KiB.
Re:SBCL Fibers – Lightweight Cooperative Threads
by surajrmal on Sunday March 15, 2026 @04:08PM
(#47391332)
You should look into how go manages goroutines. It is indeed 2kib stacks by default without the need for guard pages. They use a different mechanism to determine overflows. Other runtimes can do similar things.
Re:SBCL Fibers – Lightweight Cooperative Threads
by my-next-account on Monday March 16, 2026 @01:40AM
(#47395518)
Aha, yeah. It utilizes the compiler to insert guards at each function prologue, determining the remaining stack size.
Re:SBCL Fibers – Lightweight Cooperative Threads
by vitaminCPP on Sunday March 15, 2026 @09:10AM
(#47387056)
Yeah that was my also my thought.
I always understood that if you give a thread to each actor you get the "active object" design pattern.
I've no idea what the majority of programmers know or do not know about, but async logging isn't unknown and is supported by libraries like Log4j.