4 ms·
I'm really surprised by how much memory this task needs. Using a 16KB buffer and incrementing an integer needs multiple MB. I guess that's the size of the exec
by timClicks 7y ago
I'm really surprised by how much memory this task needs. Using a 16KB buffer and incrementing an integer needs multiple MB.
I guess that's the size of the executable after it's been loaded into RAM that's so large?
- weberc2 7y agoYeah, if that figure includes the executable, then it's also probably including the whole runtime (scheduler, GC, etc) since Go programs statically link the runtime by default. In that case, 2MB isn't so bad (especially considering glibc is ~10MB [and with no scheduler or GC!] iirc).
- ajeetdsouza 7y agoThe size of a compiled Hello World program is 2 MB on my machine, so you're probably right!