Re:What Happens to OO When Processors Are Free? (2015)
by strmpnk on Monday January 16, 2017 @02:16PM
(#13412179)
Which is pretty close to 338 words on a 64bit system (338*8). Looks like it's taking 2 extra words there though. Curious.
Re:What Happens to OO When Processors Are Free? (2015)
by masklinn on Tuesday January 17, 2017 @11:09AM
(#13418661)
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V8.1 (abort with ^G)
> {memory, Mem} = erlang:process_info(spawn(fun () -> 1 + 1 end), memory).
{memory,2704}
> Mem div erlang:system_info(wordsize).
338
338 words is what the "Advanced: Memory" guide lists: http://erlang.org/doc/efficiency_guide/advanced.html> Erlang process 338 words when spawned, including a heap of 233 words.
However note that this is with HiPE and SMP enabled (which afaik are now the default) as the "processes" guide notes[0] without both of these a process should be 309 words. Without SMP, I get 320 words (HiPE is a compilation flag and I don't feel like recompiling Erlang right now).
mem -> 2720 bytes (~2.7kb)