2 ms·
You cannot possibly be serious: package main func main() { for { } } Using 100mb+ of memory?
by exabrial 8y ago
You cannot possibly be serious:
package main
func main() {
for {
}
}
Using 100mb+ of memory?
- outside1234 8y agoIt is not "using" but allocating the addresses. The committed memory will be vastly smaller. This is how virtual memory works.
- weberc2 8y agoTo quote the parent: `The nice thing about virtual memory is that it's, well, virtual. It costs you almost nothing until you've touched it.`
- Thaxll 8y agoVirtual memory is different than resident / RSS ...
- masklinn 8y ago> Using 100mb+ of memory? It's not using them. On modern OSX, processes get something like 2.4GB vmem by default, even if they do nothing. #include <unistd.h> int main() { for(;;) { sleep(10); } } is reported as 2377M VMEM by top/htop, on 10.11.