unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Aichner <adrian@xemacs.org>
Cc: Adrian Aichner <adrian@xemacs.org>, emacs-devel@gnu.org, miles@gnu.org
Subject: Re: GC
Date: Sun, 26 Jun 2005 10:20:52 +0200	[thread overview]
Message-ID: <d5q98r6j.fsf@smtprelay.t-online.de> (raw)
In-Reply-To: <fc339e4a05062517027011980@mail.gmail.com> (Miles Bader's message of "Sun, 26 Jun 2005 09:02:57 +0900")

Miles Bader <snogglethorpe@gmail.com> writes:

> On 6/26/05, Adrian Aichner <adrian@xemacs.org> wrote:
>> >> isn't that the purpose of
>> >> gc-cons-percentage
>> >
>> > There is no such variable in Emacs.
>> 
>> Oh, so it's a XEmacs-only thing.
>
> OK; guess if we add this feature, we should use the same variable
> name though.
>
> As Gaëtan Leurent pointed out, it's also a good idea to apply min/max
> bounds to the calculated value, to handle extreme cases; what does
> xemacs do about that?

Oops, this feature not currently enabled in XEmacs!

See recompute_need_to_garbage_collect in alloc.c.

Here is its documentation from the trunk version of alloc.c anyway:

  DEFVAR_INT ("gc-cons-percentage", &gc_cons_percentage /*
*Percentage of memory allocated between garbage collections.

Garbage collection will happen if this percentage of the total amount of
memory used for data has been allocated since the last garbage collection.
However, it will not happen if less than `gc-cons-threshold' bytes have
been allocated -- this sets an absolute minimum in case very little data
has been allocated or the percentage is set very low.  Set this to 0 to
have garbage collection always happen after `gc-cons-threshold' bytes have
been allocated, regardless of current memory usage.

Garbage collection happens automatically when `eval' or `funcall' are
called.  (Note that `funcall' is called implicitly as part of evaluation.)
By binding this temporarily to a large number, you can effectively
prevent garbage collection during a part of the program.

See also `consing-since-gc'.
*/ );

So, gc-cons-threshold serves as the lower bound, and
gc-cons-percentage itself is the upper.

Adrian

>
> [I'm thinking a minimum of say the current default (400K), and a max
> of oh, 8MB.]
>
> -Miles

-- 
Adrian Aichner
 mailto:adrian@xemacs.org
 http://www.xemacs.org/

  reply	other threads:[~2005-06-26  8:20 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18 23:19 lists.texi Luc Teirlinck
2005-06-19  0:01 ` lists.texi Luc Teirlinck
2005-06-19  0:15 ` lists.texi Luc Teirlinck
2005-06-19  0:37   ` lists.texi Luc Teirlinck
2005-06-19  6:37     ` lists.texi David Kastrup
2005-06-19 15:55     ` lists.texi Richard Stallman
2005-06-19 17:47       ` lists.texi Luc Teirlinck
2005-06-20 17:52         ` lists.texi Richard Stallman
2005-06-20 23:12           ` lists.texi Luc Teirlinck
2005-06-21  5:13             ` lists.texi David Kastrup
2005-06-21 15:13             ` lists.texi Richard M. Stallman
2005-06-21 16:35             ` lists.texi Thien-Thi Nguyen
2005-06-21 19:00               ` lists.texi Luc Teirlinck
2005-06-21 21:56                 ` lists.texi Thien-Thi Nguyen
2005-06-21 19:45               ` lists.texi Luc Teirlinck
2005-06-21 20:58               ` lists.texi Luc Teirlinck
2005-06-21 22:09                 ` lists.texi Thien-Thi Nguyen
2005-06-22 16:28                 ` lists.texi Juri Linkov
2005-06-22 19:27                   ` lists.texi Eli Zaretskii
2005-06-22 18:44                     ` lists.texi Luc Teirlinck
2005-06-22 20:25                     ` lists.texi Luc Teirlinck
2005-06-23 16:53                       ` lists.texi Richard M. Stallman
2005-06-24 19:02                       ` GC (was: lists.texi) Juri Linkov
2005-06-24 19:02                     ` Juri Linkov
2005-06-24 21:08                       ` Eli Zaretskii
2005-06-24 21:54                         ` Juri Linkov
2005-06-24 23:52                           ` Luc Teirlinck
2005-06-25  0:51                             ` Miles Bader
2005-06-25  9:48                           ` Eli Zaretskii
2005-06-25 11:58                             ` GC Adrian Aichner
2005-06-25 12:53                               ` GC Miles Bader
2005-06-25 21:53                                 ` GC Adrian Aichner
2005-06-26  0:02                                   ` GC Miles Bader
2005-06-26  8:20                                     ` Adrian Aichner [this message]
2005-06-26 18:51                                       ` GC Eli Zaretskii
2005-06-26 23:43                                         ` GC Juri Linkov
2005-06-27  5:38                                         ` GC Richard M. Stallman
2005-06-26 22:42                                       ` GC Richard M. Stallman
2005-06-25 12:15                             ` GC (was: lists.texi) Miles Bader
2005-06-25 13:10                               ` GC Gaëtan LEURENT
2005-06-25 14:48                                 ` GC Eli Zaretskii
2005-06-25 14:45                               ` GC (was: lists.texi) Eli Zaretskii
2005-06-25 16:40                               ` Richard M. Stallman
2005-06-28  4:55                             ` GC Stefan Monnier
2005-06-28 21:29                               ` GC Richard M. Stallman
2005-07-11 17:00                                 ` GC 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=d5q98r6j.fsf@smtprelay.t-online.de \
    --to=adrian@xemacs.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /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).