Skip to content

Commit 4fcb506

Browse files
committed
doc/go1.16: document switch to MADV_DONTNEED
Updates #42330. Change-Id: Ifda10a5c3dca30acf1258e9e0af202e9beffc68e Reviewed-on: https://go-review.googlesource.com/c/go/+/267137 Trust: Austin Clements <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent d1efaed commit 4fcb506

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/go1.16.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,18 @@ <h2 id="runtime">Runtime</h2>
161161
TODO
162162
</p>
163163

164+
<p><!-- CL 267100 -->
165+
On Linux, the runtime now defaults to releasing memory to the
166+
operating system promptly (using <code>MADV_DONTNEED</code>), rather
167+
than lazily when the operating system is under memory pressure
168+
(using <code>MADV_FREE</code>). This means process-level memory
169+
statistics like RSS will more accurately reflect the amount of
170+
physical memory being used by Go processes. Systems that are
171+
currently using <code>GODEBUG=madvdontneed=1</code> to improve
172+
memory monitoring behavior no longer need to set this environment
173+
variable.
174+
</p>
175+
164176
<h2 id="compiler">Compiler</h2>
165177

166178
<p>

0 commit comments

Comments
 (0)