[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/alloc.c
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/src/alloc.c |
Date: |
Sat, 23 Jul 2005 15:08:06 -0400 |
Index: emacs/src/alloc.c
diff -c emacs/src/alloc.c:1.373 emacs/src/alloc.c:1.374
*** emacs/src/alloc.c:1.373 Wed Jul 13 05:33:34 2005
--- emacs/src/alloc.c Sat Jul 23 19:08:06 2005
***************
*** 172,181 ****
EMACS_INT intervals_consed;
EMACS_INT strings_consed;
! /* Number of bytes of consing since GC before another GC should be done. */
- static EMACS_INT gc_cons_threshold;
- EMACS_INT gc_cons_combined_threshold;
static Lisp_Object Vgc_cons_percentage;
/* Nonzero during GC. */
--- 172,185 ----
EMACS_INT intervals_consed;
EMACS_INT strings_consed;
! /* Minimum number of bytes of consing since GC before next GC. */
!
! EMACS_INT gc_cons_threshold;
!
! /* Similar minimum, computed from Vgc_cons_percentage. */
!
! EMACS_INT gc_relative_threshold;
static Lisp_Object Vgc_cons_percentage;
/* Nonzero during GC. */
***************
*** 4899,4910 ****
if (gc_cons_threshold < 10000)
gc_cons_threshold = 10000;
- gc_cons_combined_threshold = gc_cons_threshold;
-
if (FLOATP (Vgc_cons_percentage))
{ /* Set gc_cons_combined_threshold. */
EMACS_INT total = 0;
! EMACS_INT threshold;
total += total_conses * sizeof (struct Lisp_Cons);
total += total_symbols * sizeof (struct Lisp_Symbol);
total += total_markers * sizeof (union Lisp_Misc);
--- 4903,4912 ----
if (gc_cons_threshold < 10000)
gc_cons_threshold = 10000;
if (FLOATP (Vgc_cons_percentage))
{ /* Set gc_cons_combined_threshold. */
EMACS_INT total = 0;
!
total += total_conses * sizeof (struct Lisp_Cons);
total += total_symbols * sizeof (struct Lisp_Symbol);
total += total_markers * sizeof (union Lisp_Misc);
***************
*** 4914,4923 ****
total += total_intervals * sizeof (struct interval);
total += total_strings * sizeof (struct Lisp_String);
! threshold = total * XFLOAT_DATA (Vgc_cons_percentage);
! if (threshold > gc_cons_combined_threshold)
! gc_cons_combined_threshold = threshold;
}
if (garbage_collection_messages)
{
--- 4916,4925 ----
total += total_intervals * sizeof (struct interval);
total += total_strings * sizeof (struct Lisp_String);
! gc_relative_threshold = total * XFLOAT_DATA (Vgc_cons_percentage);
}
+ else
+ gc_relative_threshold = 0;
if (garbage_collection_messages)
{
***************
*** 6008,6014 ****
staticidx = 0;
consing_since_gc = 0;
gc_cons_threshold = 100000 * sizeof (Lisp_Object);
! gc_cons_combined_threshold = gc_cons_threshold;
#ifdef VIRT_ADDR_VARIES
malloc_sbrk_unused = 1<<22; /* A large number */
malloc_sbrk_used = 100000; /* as reasonable as any number */
--- 6010,6017 ----
staticidx = 0;
consing_since_gc = 0;
gc_cons_threshold = 100000 * sizeof (Lisp_Object);
! gc_relative_threshold = 0;
!
#ifdef VIRT_ADDR_VARIES
malloc_sbrk_unused = 1<<22; /* A large number */
malloc_sbrk_used = 100000; /* as reasonable as any number */