aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-02-23 20:12:37 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-02-23 20:12:37 +0000
commite74ce0a566bd0b9b9a2d48a27d1f1ac0c422a94a (patch)
treea6ba49c3f82eebf0730e1ddd7e5e88ad607e2b7d /src
parentd106fd2fa86dc89ae19be589bdaa9ad1df0afa86 (diff)
downloadpostgresql-e74ce0a566bd0b9b9a2d48a27d1f1ac0c422a94a.tar.gz
postgresql-e74ce0a566bd0b9b9a2d48a27d1f1ac0c422a94a.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/lmgr/lock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index bb134e0177b..3a27d6b18c9 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.84 2001/02/23 18:28:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.85 2001/02/23 20:12:37 tgl Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -1410,8 +1410,8 @@ LockShmemSize(int maxBackends)
int size = 0;
size += MAXALIGN(sizeof(PROC_HDR)); /* ProcGlobal */
- size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
- size += MAXALIGN(MAX_LOCK_METHODS * sizeof(LOCKMETHODCTL)); /* each lockMethodTable->ctl */
+ size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
+ size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each lockMethodTable->ctl */
/* lockHash table */
size += hash_estimate_size(NLOCKENTS(maxBackends),