[m-dev.] diff: fix memory leak in semaphore.m
Peter Ross
peter.ross at miscrit.be
Fri Sep 15 01:00:36 AEDT 2000
On Thu, Sep 14, 2000 at 11:55:39AM +1100, Fergus Henderson wrote:
> On 13-Sep-2000, Peter Ross <peter.ross at miscrit.be> wrote:
> >
> > Found the memory leak!
>
> Great -- BTW, how did you end up finding it?
>
By the very slow process of elimination until I had the minimal amount
of code which caused the problem. Then running the debug version of the
collector with backtraces and realising that gc wasn't causing a
problem. I do remember at an earlier stage, actually looking at the
code for the pthread library implementation, but somehow I managed to
convince my self that I only did a fixed number of mallocs in the code,
so it couldn't be a problem.
> > +:- pragma c_code("
> > +#ifdef CONSERVATIVE_GC
> > + void finalize_semaphore(GC_PTR obj, GC_PTR cd)
>
> That function should have an `ME_' prefix.
>
Will do.
Pete
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list