From 2100947d4a25dcf875be1941d0e3a409ea85051e Mon Sep 17 00:00:00 2001
From: Andrew Gerrand
Date: Thu, 11 Oct 2012 14:21:19 +1100
Subject: [PATCH] doc/faq: discuss virtual memory use by go processes
Fixes #3948.
R=golang-dev, r, dave, dsymonds
CC=golang-dev
https://golang.org/cl/6639064
---
doc/go_faq.html | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/doc/go_faq.html b/doc/go_faq.html
index 1da4d5037ad..65445d4220f 100644
--- a/doc/go_faq.html
+++ b/doc/go_faq.html
@@ -1099,6 +1099,22 @@ analysis recognizes some cases when such variables will not
live past the return from the function and can reside on the stack.
+
+Why does my Go process use so much virtual memory?
+
+
+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.
+
+
+
+To find the amount of actual memory allocated to a Go process, use the Unix
+top
command and consult the RES
(Linux) or
+RSIZE
(Mac OS X) columns.
+
+
+
Concurrency