emacs-diffs
[Top][All Lists]
Advanced

[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, 29 May 2004 12:23:11 -0400

Index: emacs/src/alloc.c
diff -c emacs/src/alloc.c:1.342 emacs/src/alloc.c:1.343
*** emacs/src/alloc.c:1.342     Sat May 29 16:10:27 2004
--- emacs/src/alloc.c   Sat May 29 16:19:41 2004
***************
*** 155,160 ****
--- 155,161 ----
  
  EMACS_INT undo_limit;
  EMACS_INT undo_strong_limit;
+ EMACS_INT undo_outer_limit;
  
  /* Number of live and free conses etc.  */
  
***************
*** 4383,4389 ****
        if (! EQ (nextb->undo_list, Qt))
          nextb->undo_list
            = truncate_undo_list (nextb->undo_list, undo_limit,
!                                 undo_strong_limit);
  
        /* Shrink buffer gaps, but skip indirect and dead buffers.  */
        if (nextb->base_buffer == 0 && !NILP (nextb->name))
--- 4384,4390 ----
        if (! EQ (nextb->undo_list, Qt))
          nextb->undo_list
            = truncate_undo_list (nextb->undo_list, undo_limit,
!                                 undo_strong_limit, undo_outer_limit);
  
        /* Shrink buffer gaps, but skip indirect and dead buffers.  */
        if (nextb->base_buffer == 0 && !NILP (nextb->name))
***************
*** 5669,5679 ****
  
    DEFVAR_INT ("undo-strong-limit", &undo_strong_limit,
              doc: /* Don't keep more than this much size of undo information.
! A command which pushes past this size is itself forgotten.
! This limit is applied when garbage collection happens.
  The size is counted as the number of bytes occupied,
  which includes both saved text and other data.  */);
    undo_strong_limit = 30000;
  
    DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages,
               doc: /* Non-nil means display messages at start and end of 
garbage collection.  */);
--- 5670,5688 ----
  
    DEFVAR_INT ("undo-strong-limit", &undo_strong_limit,
              doc: /* Don't keep more than this much size of undo information.
! A previous command which pushes the undo list past this size
! is entirely forgotten when GC happens.
  The size is counted as the number of bytes occupied,
  which includes both saved text and other data.  */);
    undo_strong_limit = 30000;
+ 
+   DEFVAR_INT ("undo-outer-limit", &undo_outer_limit,
+             doc: /* Don't keep more than this much size of undo information.
+ If the current command has produced more than this much undo information,
+ GC discards it.  This is a last-ditch limit to prevent memory overflow.
+ The size is counted as the number of bytes occupied,
+ which includes both saved text and other data.  */);
+   undo_outer_limit = 300000;
  
    DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages,
               doc: /* Non-nil means display messages at start and end of 
garbage collection.  */);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]