How can I do memory profiling for a cgo library (Go library wth bindings to C library)?

Viewed 621

I have a go program which does image processing using govips, a Go library which provides cgo bindings to libvips. How do I find out what's using memory here in which way? I'm 99% sure the actual C library (libvips) isn't leaking memory, so govips is the likely culprit.

After running my app for a couple of minutes it's processed 150 images. top utility shows total memory usage for the app at 1.6GB while hooking in with go's pprof says only 3.2MB are used.

This also verifies my go program is not the culprit but the Go library with cgo bindings to the C library.

0 Answers
Related