Re: [go-nuts] Automatically releasing memory resources allocated in cgo?

2019-11-01 Thread Tom Payne
Thank you very much for the fast, clear, and detailed answer :) On Fri, 1 Nov 2019 at 15:08, Ian Lance Taylor wrote: > On Fri, Nov 1, 2019 at 6:31 AM Tom Payne wrote: > > > > cgo is often used to provide bindings to C libraries. Any memory > allocated in the C library is not visible to Go, so G

Re: [go-nuts] Automatically releasing memory resources allocated in cgo?

2019-11-01 Thread Ian Lance Taylor
On Fri, Nov 1, 2019 at 6:31 AM Tom Payne wrote: > > cgo is often used to provide bindings to C libraries. Any memory allocated in > the C library is not visible to Go, so Go does not have an accurate view of > the program's memory usage and does not run the garbage collector or any > finalizers

[go-nuts] Automatically releasing memory resources allocated in cgo?

2019-11-01 Thread Tom Payne
cgo is often used to provide bindings to C libraries. Any memory allocated in the C library is not visible to Go, so Go does not have an accurate view of the program's memory usage and does not run the garbage collector or any finalizers often enough. Consequently, memory usage for a Go server t