Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4646a8f

Browse files
committed
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 machinesanyway), it's worth maintaining a separate freelist for 8-byte objects.Remembering that alloc chunks carry 8 bytes of overhead, this shouldreduce the net storage requirement for a long List by about a third.
1 parent0858ed2 commit4646a8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/backend/utils/mmgr/aset.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.54 2003/11/29 19:52:04 pgsql Exp $
14+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.55 2004/05/26 19:44:15 tgl Exp $
1515
*
1616
* NOTE:
1717
*This is a new (Feb. 05, 1999) implementation of the allocation set
@@ -85,16 +85,16 @@
8585
* CAUTION: ALLOC_MINBITS must be large enough so that
8686
* 1<<ALLOC_MINBITS is at least MAXALIGN,
8787
* or we may fail to align the smallest chunks adequately.
88-
*16-byte alignment is enough on all currently known machines.
88+
*8-byte alignment is enough on all currently known machines.
8989
*
9090
* With the current parameters, request sizes up to 8K are treated as chunks,
9191
* larger requests go into dedicated blocks. Change ALLOCSET_NUM_FREELISTS
9292
* to adjust the boundary point.
9393
*--------------------
9494
*/
9595

96-
#defineALLOC_MINBITS4/* smallest chunk size is16 bytes */
97-
#defineALLOCSET_NUM_FREELISTS10
96+
#defineALLOC_MINBITS3/* smallest chunk size is8 bytes */
97+
#defineALLOCSET_NUM_FREELISTS11
9898
#defineALLOC_CHUNK_LIMIT(1 << (ALLOCSET_NUM_FREELISTS-1+ALLOC_MINBITS))
9999
/* Size of largest chunk that we use a fixed size for */
100100

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp