|
From: | Dmitry Antipov |
Subject: | Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109187: Adjust consing_since_gc when objects are explicitly freed. |
Date: | Mon, 23 Jul 2012 15:34:30 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 |
On 07/23/2012 02:06 PM, Stefan Monnier wrote:
IMHO, mostly because consing_since_gc means "total size of new objects which are managed by GC". If we manage some of them by hand, we shouldn't allow GC to overestimate an amount of work to be done.So, it's only for theoretical reasons? If so, I'd rather we don't bother.
Hm... not so theoretical. For example, this really helps, especially when editing huge fontified buffers (not sure that this is 100% correct, BTW): === modified file 'src/editfns.c' --- src/editfns.c 2012-07-17 07:43:01 +0000 +++ src/editfns.c 2012-07-23 11:20:02 +0000 @@ -3379,6 +3379,10 @@ buf->clip_changed = 1; /* Remember that the narrowing changed. */ } + /* These aren't needed anymore, so don't wait for GC. */ + free_marker (XCAR (data)); + free_marker (XCDR (data)); + free_cons (XCONS (data)); } else /* A buffer, which means that there was no old restriction. */ Dmitry
[Prev in Thread] | Current Thread | [Next in Thread] |