Mercurial > emacs
comparison src/alloc.c @ 90774:81fa456eb1dc
(Fgarbage_collect): If nextb->text->inhibit_shrinking is
nonzero, don't shrink the buffer nextb.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Fri, 23 Feb 2007 06:03:41 +0000 |
| parents | f83d17e1ace6 |
| children | e6fdae9180d4 |
comparison
equal
deleted
inserted
replaced
| 90773:19c4543f1154 | 90774:81fa456eb1dc |
|---|---|
| 5041 So don't call truncate_undo_list if undo_list is Qt. */ | 5041 So don't call truncate_undo_list if undo_list is Qt. */ |
| 5042 if (! NILP (nextb->name) && ! EQ (nextb->undo_list, Qt)) | 5042 if (! NILP (nextb->name) && ! EQ (nextb->undo_list, Qt)) |
| 5043 truncate_undo_list (nextb); | 5043 truncate_undo_list (nextb); |
| 5044 | 5044 |
| 5045 /* Shrink buffer gaps, but skip indirect and dead buffers. */ | 5045 /* Shrink buffer gaps, but skip indirect and dead buffers. */ |
| 5046 if (nextb->base_buffer == 0 && !NILP (nextb->name)) | 5046 if (nextb->base_buffer == 0 && !NILP (nextb->name) |
| 5047 && ! nextb->text->inhibit_shrinking) | |
| 5047 { | 5048 { |
| 5048 /* If a buffer's gap size is more than 10% of the buffer | 5049 /* If a buffer's gap size is more than 10% of the buffer |
| 5049 size, or larger than 2000 bytes, then shrink it | 5050 size, or larger than 2000 bytes, then shrink it |
| 5050 accordingly. Keep a minimum size of 20 bytes. */ | 5051 accordingly. Keep a minimum size of 20 bytes. */ |
| 5051 int size = min (2000, max (20, (nextb->text->z_byte / 10))); | 5052 int size = min (2000, max (20, (nextb->text->z_byte / 10))); |
