commit | 5c598d3c9f0b9d78f92ffe1ab5a2365fe900c631 | [log] [tgz] |
---|---|---|
author | Sébastien Paolacci <sebastien.paolacci@gmail.com> | Thu Feb 16 13:30:04 2012 -0500 |
committer | Russ Cox <rsc@golang.org> | Thu Feb 16 13:30:04 2012 -0500 |
tree | 56aba77cf4a776ad909654548a6383ab19a0a08f | |
parent | 85d33918a0c4ad56b2f40b052963e2c1dafb7014 [diff] |
runtime: release unused memory to the OS. Periodically browse MHeap's freelists for long unused spans and release them if any. Current hardcoded settings: - GC is forced if none occured over the last 2 minutes. - spans are handed back after 5 minutes of uselessness. SysUnused (for Unix) is a wrapper on madvise MADV_DONTNEED on Linux and MADV_FREE on BSDs. R=rsc, dvyukov, remyoudompheng CC=golang-dev https://golang.org/cl/5451057