[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109111: Simple free memory accou
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109111: Simple free memory accounting feature.
Tue, 17 Jul 2012 17:40:39 +0400
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
On 07/17/2012 01:45 PM, Stefan Monnier wrote:
There are two problems, here:
- if the data is unavailable, better return nil than 0.
- we now have 2 ways to get the data, neither of which gives it all:
garbage-collect returns details data but misses the new vector-bytes
and bytes-free, whereas memory-free includes those 2 but only provides
the combined value.
The first problem is obviously a detail, but the second problem needs to
be fixed. The way I see it, it should be fixed by improving
garbage-collect's return value. The only problem with that is backward
compatibility, but AFAIK there are only 2 users of that data:
memory-usage and chart.el, which we can both fix easily.
I suggest we make garbage-collect return its data in a new format
that is more self-descriptive, like an alist where each entry takes the
form (CATEGORY SIZE USED FREE), where CATEGORY would be a symbol (like
`cons') and SIZE is the size of each element in bytes.
OK, look at this.
Description: Text document