Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e74ce0a

Browse files
committed
As long as we're fixing this space calculation, let's actually do it
right. We should MAXALIGN the individual items because we'll allocate them individually, not as an array.
1 parent d106fd2 commit e74ce0a

File tree

1 file changed

+3
-3
lines changed
  • src/backend/storage/lmgr

1 file changed

+3
-3
lines changed

src/backend/storage/lmgr/lock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.84 2001/02/23 18:28:46 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.85 2001/02/23 20:12:37 tgl Exp $
1212
*
1313
* NOTES
1414
* Outside modules can create a lock table and acquire/release
@@ -1410,8 +1410,8 @@ LockShmemSize(int maxBackends)
14101410
int size = 0;
14111411

14121412
size += MAXALIGN(sizeof(PROC_HDR)); /* ProcGlobal */
1413-
size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
1414-
size += MAXALIGN(MAX_LOCK_METHODS * sizeof(LOCKMETHODCTL)); /* each lockMethodTable->ctl */
1413+
size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
1414+
size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each lockMethodTable->ctl */
14151415

14161416
/* lockHash table */
14171417
size += hash_estimate_size(NLOCKENTS(maxBackends),

0 commit comments

Comments
 (0)