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)
commita70ccfc6de412d7ec8517594ece0777c837c375b
tree99e48acfdbc4bd2ec7ef8b3fefe1afda7802fa5a
parentaeddb6ebd0c4c6cea27b1da4b1ce4967b4aad6c5
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