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. Dmitry