Techniques for investigating untypical Go memory leaks
cossacklabs.com
Techniques for investigating untypical Go memory leaks
1–10 of 10 posts
Re: Techniques for investigating untypical Go memory leaks
#2Re: Techniques for investigating untypical Go memory leaks
#3Re: Techniques for investigating untypical Go memory leaks
#4This looks like a serious API break.
To be fair, the whole idea of the runtime automagically managing external memory gives me shivers, and this looks like moving in the right direction - I just think it was not very wise to go with that initial decision in the first place.
Re: Techniques for investigating untypical Go memory leaks
#5Re: Techniques for investigating untypical Go memory leaks
#6Re: Techniques for investigating untypical Go memory leaks
#7"When we've initially started [..], dominant was Go 1.3, which had mechanisms to detect memory blocks allocated inside used libraries and all such blocks were to be freed by GC. Go 1.6 significantly improved its memory management, however as part of those improvements memory allocated by external libraries was no longer garbage collected by the runtime." This looks like a serious API break. To be fair, the whole idea…
At some point in time, someone behind Go/CGo realized that automatically managing pointer math is an exercise that is being attempted for last 15 years without success (there always will be absolutely normal situations where you can't measure allocation correctly), and just limited visibility scope to things Go can control.
"This looks like a serious API break."
So thought we, being a bit annoyed. But when you think of how many problems it actually prevents,- it's a worthy move, in the end.
Re: Techniques for investigating untypical Go memory leaks
#8This remember me one of the Go Proverbs, Cgo is not Go https://www.youtube.com/watch?v=PAAkCSZUG1c&t=12m37s
Re: Techniques for investigating untypical Go memory leaks
#9Don't use cgo (or any dependencies that use it) if you can at all avoid doing so.
Re: Techniques for investigating untypical Go memory leaks
#10"When we've initially started [..], dominant was Go 1.3, which had mechanisms to detect memory blocks allocated inside used libraries and all such blocks were to be freed by GC. Go 1.6 significantly improved its memory management, however as part of those improvements memory allocated by external libraries was no longer garbage collected by the runtime." This looks like a serious API break. To be fair, the whole idea…