4 ms·
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 i
by 4ad 13y ago
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.
- voidlogic 13y ago+1 thanks for saying this. I am consistently amazed how many people on HN don't understand the difference between physical and virtual memory.
- axaxs 13y agoThat'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/hAWuOP5MY8w/v8p_OiOkzmQJ https://groups.google.com/forum/#!msg/golang-nuts/hAWuOP5MY8...