Skip to content

Commit

Permalink
doc/go1.16: document switch to MADV_DONTNEED
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aclements committed Nov 2, 2020
1 parent d1efaed commit 4fcb506
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/go1.16.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,18 @@ <h2 id="runtime">Runtime</h2>
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>
Expand Down

0 comments on commit 4fcb506

Please sign in to comment.