unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109131: Return more descriptive data from Fgarbage_collect.
Date: Wed, 18 Jul 2012 13:38:03 +0400	[thread overview]
Message-ID: <500683FB.6000509@yandex.ru> (raw)
In-Reply-To: <jwvliih60ws.fsf-monnier+emacs@gnu.org>

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)
> and
>    (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.

Dmitry



  reply	other threads:[~2012-07-18  9:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1SrNZW-0003vA-5g@vcs.savannah.gnu.org>
2012-07-18  6:33 ` [Emacs-diffs] /srv/bzr/emacs/trunk r109131: Return more descriptive data from Fgarbage_collect Stefan Monnier
2012-07-18  9:38   ` Dmitry Antipov [this message]
2012-07-18 10:46     ` Stefan Monnier
2012-07-18 12:46       ` Dmitry Antipov
2012-07-19  7:55         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=500683FB.6000509@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).