emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Is there any possible memory leak in GC?


From: Herbert Euler
Subject: RE: Is there any possible memory leak in GC?
Date: Fri, 14 Dec 2007 07:48:54 +0800

>> After watching the use of `cons_free_list', I am confused about it.
>> `cons_free_list' holds the unmarked cons cells during GC sweeping.
>> When `cons' creates new cons cells, it picks any ones in
>> `cons_free_list' if possible. But each time when sweeping happens,
>> `cons_free_list' is reset to 0, and its previous value is lost. Since
>> GC can run at any time with `garbage-collect', will this lead to
>> memory leak or not?
>
> No, it should not lead to any leak because it will find all the cells
> that were still on the cons_free_list and add them back, while sweeping
> the cons blocks.

Ah, I have found the gap between my understanding and the
fact.  Thank you! :D

Regards,
Guanpeng Xu
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]