Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, everything that worked before, still does (on 64-bit). A stack segment uses 8kB of virtual address space. It will only use a page (4kB) of physical memory if you don't need that much stack. The operating system will map the second page only when it faults.

If you need more stack, the point is moot because you used more physical memory before as well, it was just split into more stack segments.



+1 thanks for saying this. I am consistently amazed how many people on HN don't understand the difference between physical and virtual memory.


I'll refrain from making a smartass comment, just state I understand the difference perfectly. This causes a jump in physical memory usage. See reply to your parent.


Even fewer know what TLBs do.


That's fine for a single segment, but these are reused. So overtime, this can cause a spike in rss, see - https://groups.google.com/forum/#!msg/golang-nuts/hAWuOP5MY8...


All of this is now moot since Go now has moving stacks.


Not really. My point still stands, regardless of whether it holds true in the future.


The future is now. Go, now, today, has moving stacks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: