Re: [go-nuts] CGO Threads and Memory Not Being Released in Go

2025-03-08 Thread David Bell
ervice - and then limit > the number of requests in flight. > > When I limit it to 64 threads on my Mac, I see about 16mb memory being > used. > > On Mar 4, 2025, at 2:59 PM, David Bell wrote: > > Thanks for the response Robert, > > I tried to put a sem

Re: [go-nuts] CGO Threads and Memory Not Being Released in Go

2025-03-08 Thread David Bell
UTC+2 David Bell wrote: > Hi Ian and Robert, > > First, thank you both for taking the time to answer and provide insights! > I really appreciate it. > > To clarify, my real program is a long-lived process that receives network > traffic from C++ code and processes it in Go.

Re: [go-nuts] CGO Threads and Memory Not Being Released in Go

2025-03-04 Thread David Bell
o you ensure only so many C calls are made simultaneously. >> >> >> On Mar 4, 2025, at 1:26 PM, David Bell wrote: >> >> *Hi everyone,* >> >> I'm relatively new to Go and even newer to *CGO*, so I’d really >> appreciate any guidance on an issue I’

[go-nuts] CGO Threads and Memory Not Being Released in Go

2025-03-04 Thread David Bell
*Hi everyone,* I'm relatively new to Go and even newer to *CGO*, so I’d really appreciate any guidance on an issue I’ve been facing. *Problem Overview* I noticed that when using CGO, my application's *memory usage keeps increasing*, and threads do not seem to be properly cleaned up. The Go