/[emacs]/emacs/src/alloc.c
ViewVC logotype

Diff of /emacs/src/alloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.255 by pj, Tue Nov 13 06:55:14 2001 UTC revision 1.256 by andrewi, Wed Dec 5 21:37:48 2001 UTC
# Line 1020  make_number (n) Line 1020  make_number (n)
1020    
1021  /* Lisp_Strings are allocated in string_block structures.  When a new  /* Lisp_Strings are allocated in string_block structures.  When a new
1022     string_block is allocated, all the Lisp_Strings it contains are     string_block is allocated, all the Lisp_Strings it contains are
1023     added to a free-list stiing_free_list.  When a new Lisp_String is     added to a free-list string_free_list.  When a new Lisp_String is
1024     needed, it is taken from that list.  During the sweep phase of GC,     needed, it is taken from that list.  During the sweep phase of GC,
1025     string_blocks that are entirely free are freed, except two which     string_blocks that are entirely free are freed, except two which
1026     we keep.     we keep.
# Line 4096  Garbage collection happens automatically Line 4096  Garbage collection happens automatically
4096            nextb->undo_list            nextb->undo_list
4097              = truncate_undo_list (nextb->undo_list, undo_limit,              = truncate_undo_list (nextb->undo_list, undo_limit,
4098                                    undo_strong_limit);                                    undo_strong_limit);
4099    
4100            /* Shrink buffer gaps, but skip indirect and dead buffers.  */
4101            if (nextb->base_buffer == 0 && !NILP (nextb->name))
4102              {
4103                /* If a buffer's gap size is more than 10% of the buffer
4104                   size, or larger than 2000 bytes, then shrink it
4105                   accordingly.  Keep a minimum size of 20 bytes.  */
4106                int size = min (2000, max (20, (nextb->text->z_byte / 10)));
4107    
4108                if (nextb->text->gap_size > size)
4109                  {
4110                    struct buffer *save_current = current_buffer;
4111                    current_buffer = nextb;
4112                    make_gap (-(nextb->text->gap_size - size));
4113                    current_buffer = save_current;
4114                  }
4115              }
4116    
4117          nextb = nextb->next;          nextb = nextb->next;
4118        }        }
4119    }    }

Legend:
Removed from v.1.255  
changed lines
  Added in v.1.256

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26