Date: Sat, 05 Mar 2011 16:44:55 +0000 From: Deomid Ryabkov <myself@rojer.pp.ru> To: Eric Anderson <anderson@ttel.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Mem leak : malloc/free + pthreads = leakage? Message-ID: <4D726887.5080800@rojer.pp.ru> In-Reply-To: <40A52D4A-9397-4406-A7EC-E7CBBEFADD55@freebsd.org> References: <40A52D4A-9397-4406-A7EC-E7CBBEFADD55@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03/05/2011 04:02 AM, Eric Anderson wrote: > Hi all, > > I have a moderately threaded userland program (all C) I am working on (using pthreads, freebsd 8.1 64bit). It seems to leak memory (using standard malloc/free) badly. as opposed to what? OpenBSD? Linux? Windows? why do you think your problem is specific to FreeBSD (as evidenced by your post to a FreeBSD-specific list) or is related to threaded programs? > I am using pcap to capture packets and process them. I have a handful of libs statically linked in (pcap is one, the rest don't seem to matter - I can remove them and still see the leak). > > Does anyone know of issues regarding malloc/free on multithreaded userland apps? hell yeah. it goes like this: you malloc() then forget to free() - boom, you have a memory leak. you're welcome. sarcasm aside, those questions still remain: why do you think os/libraries are the problem and not your code? you can't post all of it, ok, and we don't want all of it either. can you isolate a specific example of where valid usage of a library causes a leak? > Sorry, I can't post the code.. > > Thanks! > Eric > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Deomid "rojer" Ryabkov myself@rojer.pp.ru ICQ: 8025844
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D726887.5080800>