I knew I had seen something on that. :) I guess Go doesn’t need a compacting collector if it can allocate most objects on the stack to avoid fragmentation.
> On Jul 13, 2021, at 4:34 AM, Brian Candler <b.cand...@pobox.com> wrote: > > >> On Tuesday, 13 July 2021 at 03:52:24 UTC+1 bai...@gmail.com wrote: >> Hi, I wrote a test program, which tests when GC starts to return heap space >> to OS. >> Here's the code: https://paste.ubuntu.com/p/jxHqDnsM2T/ >> >> But I've waited for a long time and haven't seen the RSS memory reduced. I >> can't figured out why, Any help ? (go version 1.14.3) > > There was a change in go 1.16 which could affect this, so I suggest you try > the latest go. > > Previously, go just marked the pages as "can be freed when required" - but > the OS would not actually free them until under memory pressure. Now it tells > the OS to free them immediately. > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/7c99fe43-376d-4f94-9070-17dafbe6baffn%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/508DA5F7-E15C-4E95-B957-16B469AB0AD6%40ix.netcom.com.