runtime: GC & debug.FreeOSMemory calls don't return memory to the OS #45000
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
A programm allocates some memory and than release it.
https://play.golang.org/p/Ljr0c6zRasB
What did you expect to see?
The programm releases allocated memor and after runtime.GC() & debug.FreeOSMemory() calls I expect that values of VmSize/VmData drop, but nothing happen.
What did you see instead?
Values of VmSize/VmData remains the same
-- (comment) the programm started
START VmSize:725Mb VmLck:0 VmPin:0 VmRSS:1 VmData:717 VmStk:0 VmExe:0 VmLib:1
-- (comment) the programm allocated memory for buffers
END
END
....
END
-- (comment) the programm released memory and shoud return it to the system
I tried to use "env GODEBUG=madvdontneed=1 ./test2" but it didn't help, it seems that kernel 3.10.0 always use MADV_DONTNEED and GODEBUG=madvdontneed=1 changes nothing
pmap also saw allocated memory
The text was updated successfully, but these errors were encountered: