• Sébastien Paolacci's avatar
    runtime: release unused memory to the OS. · 5c598d3c
    Sébastien Paolacci authored
    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
    5c598d3c
malloc.h 14.5 KB