1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Install new alignment code to use MAXALIGN rather than DOUBLEALIGN where

approproate.
This commit is contained in:
Bruce Momjian
1999-07-19 07:07:29 +00:00
parent e259780b13
commit faf7d78174
19 changed files with 70 additions and 69 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.57 1999/07/17 20:17:45 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.58 1999/07/19 07:07:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,8 +57,8 @@
*/
#define IFREESPC(p) (PageGetFreeSpace(p) - \
DOUBLEALIGN(offsetof(HeapTupleHeaderData,t_bits)) - \
DOUBLEALIGN(sizeof(struct varlena) + sizeof(int32)) - \
MAXALIGN(offsetof(HeapTupleHeaderData,t_bits)) - \
MAXALIGN(sizeof(struct varlena) + sizeof(int32)) - \
sizeof(double))
#define IMAXBLK 8092
#define IMINBLK 512
@@ -1005,11 +1005,11 @@ inv_newtuple(LargeObjectDesc *obj_desc,
/* compute tuple size -- no nulls */
hoff = offsetof(HeapTupleHeaderData, t_bits);
hoff = DOUBLEALIGN(hoff);
hoff = MAXALIGN(hoff);
/* add in olastbyte, varlena.vl_len, varlena.vl_dat */
tupsize = hoff + (2 * sizeof(int32)) + nwrite;
tupsize = DOUBLEALIGN(tupsize);
tupsize = MAXALIGN(tupsize);
/*
* Allocate the tuple on the page, violating the page abstraction.