3 ms·
Actors are a model, I have no clue why you're saying that there is a particular memory cost to them on real hardware. To me, you can implement actors using fibe
by my-next-account 7mo ago
Actors are a model, I have no clue why you're saying that there is a particular memory cost to them on real hardware. To me, you can implement actors using fibers and a postbox.
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.
- vitaminCPP 7mo agoYeah 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.
- zelphirkalt 7mo agoI remember Joe Armstrong saying something like 2kB in his talks, for an Erlang process. That's 1/128 of 256kB.
- my-next-account 7mo ago2KiB 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.
- surajrmal 7mo agoYou 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.
- my-next-account 7mo agoAha, yeah. It utilizes the compiler to insert guards at each function prologue, determining the remaining stack size.