1 Oct 2009 01:02
Re: confusion tracking down memory leak
Thomas Bushnell BSG <tb <at> becket.net>
2009-09-30 23:02:02 GMT
2009-09-30 23:02:02 GMT
I found my leak, for those interested. The Chicken mysql egg magically stores results away inside mysql-query, which you must free with mysql-free-result, even though they are unreachable once another mysql-query has intervened. Thomas On Wed, 2009-09-30 at 21:11 +0200, Andreas Rottmann wrote: > Thomas Bushnell BSG <tb <at> becket.net> writes: > > > I have a memory leak in a long-running program; I can easily provoke it. > > (It's quite complex; too complex to post here.) > > > > The program involves lots of FFI interfaces to Linux syscalls, and other > > stuff. > > > > The memory leak is *not* in Scheme; this is verified by the fact that > > (memory-statistics) while it's running shows bounded memory consumption. > > > > Yet the heap usage is growing without limit. There's bad malloc going > > on somewhere. > > > > Are there any convenient tools to try and figure out malloc usage in > > Chicken Scheme? > > > Dunno specifically about Chicken Scheme (and "convinient"(Continue reading), but given > the fact that your leak is in C code, you might be able to make sense > from Valgrind[0] output -- for C/C++ this works great, usually. > > [0] http://valgrind.org/
, but given
> the fact that your leak is in C code, you might be able to make sense
> from Valgrind[0] output -- for C/C++ this works great, usually.
>
> [0]
RSS Feed