[m-dev.] diff: fix memory leak in semaphore.m

Peter Ross peter.ross at miscrit.be
Thu Sep 14 02:56:51 AEDT 2000


On Wed, Sep 13, 2000 at 03:59:01PM +0200, Peter Ross wrote:
> Hi,
> 
> Found the memory leak!
> The reason why it only showed up under Windows was because linux
> pthreads don't do any allocate any resources for a condvars and mutexs
> so they don't need to be explicitly destroyed.
> 
OK, now I am really confused.

I have tested out two versions of a program using the new semaphore
module, with a diagonistic printout of which object is being freed.  One
is compiled with -D GC_DEBUG and the other not.

The version with GC_DEBUG defined prints out the debug message and its
heap use stays static, the other version doesn't and its heap use keeps
going up and up.

I have tried running GC_invoke_finalizers() explicitly, and setting
GC_finalize_on_demand to be FALSE, neither of which helped.

Any other ideas?

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