[CM] tips for chasing down memory leaks?
Iain Duncan
iainduncanlists at gmail.com
Mon Mar 16 11:19:55 PDT 2026
Ah... classic rubber duck problem. As soon as I finished typing this up I
thought ... "maybe my home made debugger capturing the environment is never
freeing the last capture?" and yup, that's what it was. silly me.
I am, nonetheless, interested in the question... but much less urgently!
thx!
On Mon, Mar 16, 2026 at 11:09 AM Iain Duncan <iainduncanlists at gmail.com>
wrote:
> Hi Schemers, I have (in s7) created a (brute-force) backtracking
> constraint satisfaction solver for generating exercise melodies against a
> chord progression. It makes a big old recursive tree on each solve as it
> also tracks all the domain values possible at every node in order to take
> random walks through the problem space rather than just accepting the first
> good one. It's working well, except that I apparently have created a hell
> of a memory leak... when running in my web assembly project I hit an out of
> memory error after about 40 passes. Which is odd, because on each pass I
> make a whole new solver and search tree, so I guess somehow I am preventing
> the GC from cleaning up the previous ones.
>
> I'm just hoping to get any tips/tricks for chasing this kind of thing
> down, whether general lisp strategies or s7 specific tricks I could use!
>
> BTW, Bill in my reading for this work (cope's "Computers and Musical
> Style" I came across a related citation to a paper of yours from 1989! So
> if you have suggestions on good readings for this area of study, I'm all
> ears. :-)
>
> thanks!
> iain
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20260316/176498aa/attachment.html>
More information about the Cmdist
mailing list