]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Remove BufferBlockPointers array in favor of a base + (bufnum) * BLCKSZ
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Aug 2005 05:05:51 +0000 (05:05 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Aug 2005 05:05:51 +0000 (05:05 +0000)
commit3ae7e4a33b595c4f157d29e4584175a054b5b520
treea7d5a0c868902d31d5728f75e3078a4e63d028f3
parentb609695b7a5c1cf7c1234143eeb35809d00ff741
Remove BufferBlockPointers array in favor of a base + (bufnum) * BLCKSZ
computation.  On modern machines this is as fast if not faster, and we
don't have to clog the CPU's L2 cache with a tens-of-KB pointer array.
If we ever decide to adopt a more dynamic allocation method for shared
buffers, we'll probably have to revert this patch, but in the meantime
we might as well save a few bytes and nanoseconds.  Per Qingqing Zhou.
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/bufmgr.c
src/include/storage/bufmgr.h