diff options
author | Andrew Gerrand <adg@golang.org> | 2012-10-11 14:21:19 +1100 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2012-10-11 14:21:19 +1100 |
commit | a069e4cebc56a460bd437c8d2afa259fb6474033 (patch) | |
tree | 784de6c73873da0422c30cad46e06b5824c48d09 /doc/go_faq.html | |
parent | 66408a4f9632b47eb93c254a9e1c28cd8cc72169 (diff) | |
download | go-a069e4cebc56a460bd437c8d2afa259fb6474033.tar.gz |
doc/faq: discuss virtual memory use by go processes
Fixes issue 3948.
R=golang-dev, r, dave, dsymonds
CC=golang-dev
http://codereview.appspot.com/6639064
Diffstat (limited to 'doc/go_faq.html')
-rw-r--r-- | doc/go_faq.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/go_faq.html b/doc/go_faq.html index 1da4d5037..65445d422 100644 --- a/doc/go_faq.html +++ b/doc/go_faq.html @@ -1099,6 +1099,22 @@ analysis</em> recognizes some cases when such variables will not live past the return from the function and can reside on the stack. </p> +<h3 id="Why_does_my_Go_process_use_so_much_virtual_memory"> +Why does my Go process use so much virtual memory?</h3> + +<p> +The Go memory allocator reserves a large region of virtual memory as an arena +for allocations. This virtual memory is local to the specific Go process; the +reservation does not deprive other processes of memory. +</p> + +<p> +To find the amount of actual memory allocated to a Go process, use the Unix +<code>top</code> command and consult the <code>RES</code> (Linux) or +<code>RSIZE</code> (Mac OS X) columns. +<!-- TODO(adg): find out how this works on Windows --> +</p> + <h2 id="Concurrency">Concurrency</h2> <h3 id="What_operations_are_atomic_What_about_mutexes"> |