Re: [Gc] Threads leak memory?
ivmai at mail.ru
Fri Oct 24 08:24:28 PDT 2008
<ludo at gnu.org> (Ludovic CourtХs) wrote:
> While comparing my BDW-GC-based Guile with current Guile, I noticed
> something fishy in terms of memory usage in the presence of pthreads on
> GNU/Linux using GC 7.1.
> This approximation makes sense as Guile doesn't use `mmap ()' directly.
> However, when a thread is created and terminates, the total measured via
> `smaps' is as much as 18 times `GC_get_heap_size ()'; with 10 threads
> created, it's 23 times `GC_get_heap_size ()'; it doesn't go much beyond
> as the number of threads increases.
> I confirmed with GDB that `GC_delete_thread ()' is actually called upon
> thread exit, so I guess GC's cleanup procedure *is* performed.
> Any idea what's going wrong or what I should look at?
> Thanks in advance,
First of all, try to use GC7.2a1 (from CVS).
Next, what is the config of GC You using (like, with or without thread-local-alloc, etc.)?
Could You reproduce this behaviour without USE_MMAP, with/without USE_MUNMAP?
More information about the Gc