aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-05-26 19:44:15 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-05-26 19:44:15 +0000
commit4646a8f32fbae1581ff0a2fa259bced82fc583e7 (patch)
tree89723a25038d1d4506ac3f608df4ee4346e75d0d
parent0858ed20d2a3da65de63926c272f80d988a6c58d (diff)
downloadpostgresql-4646a8f32fbae1581ff0a2fa259bced82fc583e7.tar.gz
postgresql-4646a8f32fbae1581ff0a2fa259bced82fc583e7.zip
Reduce the minimum allocable chunk size to 8 bytes (from 16). Now that
ListCells are only 8 bytes instead of 12 (on 4-byte-pointer machines anyway), it's worth maintaining a separate freelist for 8-byte objects. Remembering that alloc chunks carry 8 bytes of overhead, this should reduce the net storage requirement for a long List by about a third.
-rw-r--r--src/backend/utils/mmgr/aset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index 1a83b2416f4..435b4597083 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.54 2003/11/29 19:52:04 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.55 2004/05/26 19:44:15 tgl Exp $
*
* NOTE:
* This is a new (Feb. 05, 1999) implementation of the allocation set
@@ -85,7 +85,7 @@
* CAUTION: ALLOC_MINBITS must be large enough so that
* 1<<ALLOC_MINBITS is at least MAXALIGN,
* or we may fail to align the smallest chunks adequately.
- * 16-byte alignment is enough on all currently known machines.
+ * 8-byte alignment is enough on all currently known machines.
*
* With the current parameters, request sizes up to 8K are treated as chunks,
* larger requests go into dedicated blocks. Change ALLOCSET_NUM_FREELISTS
@@ -93,8 +93,8 @@
*--------------------
*/
-#define ALLOC_MINBITS 4 /* smallest chunk size is 16 bytes */
-#define ALLOCSET_NUM_FREELISTS 10
+#define ALLOC_MINBITS 3 /* smallest chunk size is 8 bytes */
+#define ALLOCSET_NUM_FREELISTS 11
#define ALLOC_CHUNK_LIMIT (1 << (ALLOCSET_NUM_FREELISTS-1+ALLOC_MINBITS))
/* Size of largest chunk that we use a fixed size for */