]> granicus.if.org Git - postgresql/commit
Embedded list interface
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 16 Oct 2012 20:36:30 +0000 (17:36 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 17 Oct 2012 14:31:20 +0000 (11:31 -0300)
commita66ee69add6e129c7674a59f8c3ba010ed4c9386
tree8e3b1f182d2b302904b7d6e32563da03e5c6aa61
parentf862a326efa3087440bc86cbfe58ea11c977068a
Embedded list interface

Provide a common implementation of embedded singly-linked and
doubly-linked lists.  "Embedded" in the sense that the nodes'
next/previous pointers exist within some larger struct; this design
choice reduces memory allocation overhead.

Most of the implementation uses inlineable functions (where supported),
for performance.

Some existing uses of both types of lists have been converted to the new
code, for demonstration purposes.  Other uses can (and probably will) be
converted in the future.  Since dllist.c is unused after this conversion,
it has been removed.

Author: Andres Freund
Some tweaks by me
Reviewed by Tom Lane, Peter Geoghegan
src/backend/lib/Makefile
src/backend/lib/dllist.c [deleted file]
src/backend/lib/ilist.c [new file with mode: 0644]
src/backend/postmaster/autovacuum.c
src/backend/postmaster/postmaster.c
src/backend/utils/cache/catcache.c
src/include/lib/dllist.h [deleted file]
src/include/lib/ilist.h [new file with mode: 0644]
src/include/utils/catcache.h