Skip to content

Commit 28988a8

Browse files
committed
Reorder LOCALLOCK structure members to compact the size
Save 8 bytes (on x86-64) by filling up padding holes. Author: Takayuki Tsunakawa <tsunakawa.takay@jp.fujitsu.com> Discussion: https://www.postgresql.org/message-id/20190219001639.ft7kxir2iz644alf@alap3.anarazel.de
1 parent 75c5705 commit 28988a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/include/storage/lock.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,15 @@ typedef struct LOCALLOCK
404404
LOCALLOCKTAG tag; /* unique identifier of locallock entry */
405405

406406
/* data */
407+
uint32 hashcode; /* copy of LOCKTAG's hash value */
407408
LOCK *lock; /* associated LOCK object, if any */
408409
PROCLOCK *proclock; /* associated PROCLOCK object, if any */
409-
uint32 hashcode; /* copy of LOCKTAG's hash value */
410410
int64 nLocks; /* total number of times lock is held */
411-
bool holdsStrongLockCount; /* bumped FastPathStrongRelationLocks */
412-
bool lockCleared; /* we read all sinval msgs for lock */
413411
int numLockOwners; /* # of relevant ResourceOwners */
414412
int maxLockOwners; /* allocated size of array */
415413
LOCALLOCKOWNER *lockOwners; /* dynamically resizable array */
414+
bool holdsStrongLockCount; /* bumped FastPathStrongRelationLocks */
415+
bool lockCleared; /* we read all sinval msgs for lock */
416416
} LOCALLOCK;
417417

418418
#define LOCALLOCK_LOCKMETHOD(llock) ((llock).tag.lock.locktag_lockmethodid)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy