I know and I appreciate your help. :) The program is a server and is meant to be a secure proxy to other daemons which makes it sort of a daemon itself. It seems to consistently grow by about 2K per connection and I can't seem to track down the source. The process seems to keep growing unbounded. I am not 100% sure it is a leak but the problem is that the heap grows by 300% and that is not acceptable. I have managed to get rid of almost every piece of memory that I have malloced and chiseled down to as much static memory as I can. Even still, there still seems to be this 2K heap growth.
It looks like specifically one of the functions that seems to be leaking memory is PR_NewLock. This only listed as a possible leak, but I have a logging thread that uses this heavily to keep the main thread from stomping on it. I don't know if is a true memory leak, but Valgrind is saying that it is a possible leak and it seems to be the only one that is reported consistently throughout my output. -David Julien Pierre wrote: > David, > > David Butler Jr. wrote: > > I currently have an application that is based on NSS. Unfortunately, I > > cannot post any of the code, but it seems to have a memory leak. It uses > > thread pools and seems to leak about 2K per connection. I have run > > valgrind against the binaries on linux and there seems to be a leak > > surrounding the CERT_GetCertNicknames function. The real problem is that > > this function is only called once inside of my program, but never again. > > Valgrind is giving hints about still reachable blocks and possible leaks > > but the only definite seems to be from that function. Does anyone have a > > clue of some tricks I might be able to use or anything else that might be > > going on? > > You really aren't giving us much to work with. > > Are you certain your program is leaking, or are you taking the word of a > single tool ? Please confirm it from multiple sources (eg. memory usage > in top, vmstat, etc.). > > Is your program a server or client program ? > Either way, perhaps you can run it single-threaded, or with a very low > number of threads, and try to isolate the problem with your tools. _______________________________________________ mozilla-crypto mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-crypto
