]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.16: document switch to MADV_DONTNEED
authorAustin Clements <austin@google.com>
Mon, 2 Nov 2020 16:43:50 +0000 (11:43 -0500)
committerAustin Clements <austin@google.com>
Mon, 2 Nov 2020 21:08:14 +0000 (21:08 +0000)
Updates #42330.

Change-Id: Ifda10a5c3dca30acf1258e9e0af202e9beffc68e
Reviewed-on: https://go-review.googlesource.com/c/go/+/267137
Trust: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
doc/go1.16.html

index 3592d0b66313d96b4852ac73dac11174184e18c8..5d2930788612f08057246560fd47df1eb3f1aca3 100644 (file)
@@ -161,6 +161,18 @@ Do not send CLs removing the interior tags from such phrases.
   TODO
 </p>
 
+<p><!-- CL 267100 -->
+  On Linux, the runtime now defaults to releasing memory to the
+  operating system promptly (using <code>MADV_DONTNEED</code>), rather
+  than lazily when the operating system is under memory pressure
+  (using <code>MADV_FREE</code>). This means process-level memory
+  statistics like RSS will more accurately reflect the amount of
+  physical memory being used by Go processes. Systems that are
+  currently using <code>GODEBUG=madvdontneed=1</code> to improve
+  memory monitoring behavior no longer need to set this environment
+  variable.
+</p>
+
 <h2 id="compiler">Compiler</h2>
 
 <p>