[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109131: Return more descriptive
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109131: Return more descriptive data from Fgarbage_collect.
Wed, 18 Jul 2012 13:38:03 +0400
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
On 07/18/2012 10:33 AM, Stefan Monnier wrote:
That's not regular enough. Every entry in the list should have the
same shape (NAME SIZE USED FREE). For buffers, (buffers SIZE USED) is OK
because that's like having FREE set to nil, but for strings (STRING
INTERNAL-SIZE USED-STRINGS USED-STRING-BYTES FREE-STRING) is not good,
we want instead to have 2 entries:
(strings SIZE USED FREE)
(string-bytes 1 USED FREE)
IIUC, FREE is always between 0 and SBLOCK_BYTES after compacting sblocks,
so I don't see too much sense here.
same for vectors, where we need one entry for vectors and another for
vector slots (and BTW, please keep it vector slots rather than vector
bytes: the SIZE part is there specifically so that code that requires
byte counts can do the conversion later).
IMHO counting vector slots is poor idea because:
1) vectors are of different length, so, having just a number of vector
slots, we don't know how much of struct vectorlike_header we have
(and they eats memory too);
2) this doesn't count extra space beyond Lisp_Objects in pseudovectors
and doesn't count space used by bool vectors.