Add indirection counting to speed up Fkill_buffer.
commit9928463dcdb0164477785e83406602065de79ef8
authorDmitry Antipov <dmantipov@yandex.ru>
Fri, 20 Jul 2012 16:05:47 +0000 (20 20:05 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Fri, 20 Jul 2012 16:05:47 +0000 (20 20:05 +0400)
tree14d6b28885b7e333733ff4eb62275e6e425f81b3
parentf8643a6b9e35af22b69a84f83df5d9410de82f16
Add indirection counting to speed up Fkill_buffer.
* buffer.h (struct buffer): New member.
* buffer.c (Fget_buffer_create): Set indirection counter to 0.
(Fmake_indirect_buffer): Set indirection counter to -1, increment
base buffer indirection counter.
(compact_buffer): If ENABLE_CHECKING, verify indirection counters.
(Fkill_buffer): Adjust indirection counters as needed, don't walk
through buffer list if indirection counter is 0.
src/ChangeLog
src/buffer.c
src/buffer.h