Restructure padding to handle structure already 128 bytes(alpha).
This commit is contained in:
parent
60265ee651
commit
6dbe1be690
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: buf_internals.h,v 1.10 1997/01/23 18:15:29 momjian Exp $
|
* $Id: buf_internals.h,v 1.11 1997/01/25 03:09:33 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTE
|
* NOTE
|
||||||
* If BUFFERPAGE0 is defined, then 0 will be used as a
|
* If BUFFERPAGE0 is defined, then 0 will be used as a
|
||||||
@ -115,12 +115,13 @@ struct sbufdesc_unpadded {
|
|||||||
BufFlags flags;
|
BufFlags flags;
|
||||||
int16 bufsmgr;
|
int16 bufsmgr;
|
||||||
unsigned refcount;
|
unsigned refcount;
|
||||||
char sb_dbname[NAMEDATALEN+1];
|
|
||||||
char sb_relname[NAMEDATALEN+1];
|
|
||||||
#ifdef HAS_TEST_AND_SET
|
#ifdef HAS_TEST_AND_SET
|
||||||
slock_t io_in_progress_lock;
|
slock_t io_in_progress_lock;
|
||||||
#endif /* HAS_TEST_AND_SET */
|
#endif /* HAS_TEST_AND_SET */
|
||||||
/* NOTE NO sb_pad HERE */
|
char sb_dbname[NAMEDATALEN+1];
|
||||||
|
|
||||||
|
/* NOTE NO PADDING OF THE MEMBER HERE */
|
||||||
|
char sb_relname[NAMEDATALEN+1];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* THE REAL STRUCTURE - the structure above must match it, minus sb_pad */
|
/* THE REAL STRUCTURE - the structure above must match it, minus sb_pad */
|
||||||
@ -137,13 +138,13 @@ struct sbufdesc {
|
|||||||
int16 bufsmgr; /* storage manager id for buffer */
|
int16 bufsmgr; /* storage manager id for buffer */
|
||||||
unsigned refcount; /* # of times buffer is pinned */
|
unsigned refcount; /* # of times buffer is pinned */
|
||||||
|
|
||||||
char sb_dbname[NAMEDATALEN+1]; /* name of db in which buf belongs */
|
|
||||||
char sb_relname[NAMEDATALEN+1]; /* name of reln */
|
|
||||||
#ifdef HAS_TEST_AND_SET
|
#ifdef HAS_TEST_AND_SET
|
||||||
/* can afford a dedicated lock if test-and-set locks are available */
|
/* can afford a dedicated lock if test-and-set locks are available */
|
||||||
slock_t io_in_progress_lock;
|
slock_t io_in_progress_lock;
|
||||||
#endif /* HAS_TEST_AND_SET */
|
#endif /* HAS_TEST_AND_SET */
|
||||||
|
|
||||||
|
char sb_dbname[NAMEDATALEN+1]; /* name of db in which buf belongs */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I padded this structure to a power of 2 (PADDED_SBUFDESC_SIZE) because
|
* I padded this structure to a power of 2 (PADDED_SBUFDESC_SIZE) because
|
||||||
* BufferDescriptorGetBuffer is called a billion times and it does an
|
* BufferDescriptorGetBuffer is called a billion times and it does an
|
||||||
@ -155,7 +156,11 @@ struct sbufdesc {
|
|||||||
* going to make some of these types bigger soon anyway... -pma 1/2/93
|
* going to make some of these types bigger soon anyway... -pma 1/2/93
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char sb_pad[PADDED_SBUFDESC_SIZE-sizeof(struct sbufdesc_unpadded)];
|
/* please, don't take the sizeof() this member and use it for
|
||||||
|
something important */
|
||||||
|
|
||||||
|
char sb_relname[NAMEDATALEN+1+ /* name of reln */
|
||||||
|
PADDED_SBUFDESC_SIZE-sizeof(struct sbufdesc_unpadded)];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user