<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Madvise on Shai Asher</title><link>https://slow-is-smooth.io/tags/madvise/</link><description>Recent content in Madvise on Shai Asher</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 06 Oct 2019 09:00:00 +0300</lastBuildDate><atom:link href="https://slow-is-smooth.io/tags/madvise/index.xml" rel="self" type="application/rss+xml"/><item><title>Memory the Runtime Keeps</title><link>https://slow-is-smooth.io/blog/memory-the-runtime-keeps/</link><pubDate>Sun, 06 Oct 2019 09:00:00 +0300</pubDate><guid>https://slow-is-smooth.io/blog/memory-the-runtime-keeps/</guid><description>&lt;p&gt;A Go 1.13 program builds up a gigabyte of heap, drops it, and collects the garbage. Three minutes&#10;later the runtime reports that it has given all of that gigabyte back to the operating system. The&#10;kernel still counts every byte of it against the program: &lt;code&gt;top&lt;/code&gt; shows 1,058 megabytes resident, and&#10;it goes on showing 1,058 for as long as anyone watches. Then another program on the same machine asks&#10;for memory, and within seconds the Go program&amp;rsquo;s resident set drops to 38 megabytes, without the Go&#10;program doing anything at all. Both the runtime and &lt;code&gt;top&lt;/code&gt; were telling the truth.&lt;/p&gt;</description></item></channel></rss>