diff options
author | Bruce Momjian | 1997-01-25 03:09:33 +0000 |
---|---|---|
committer | Bruce Momjian | 1997-01-25 03:09:33 +0000 |
commit | 6dbe1be690055186cac5b7e79a18470391ad6172 (patch) | |
tree | 0a882f00544efb7a31fa53269e84aa70190e8beb /src | |
parent | 60265ee6513df64552701fbb4a329845441cfdba (diff) |
Restructure padding to handle structure already 128 bytes(alpha).
Diffstat (limited to 'src')
-rw-r--r-- | src/include/storage/buf_internals.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index e5e8927e60f..356d2d8e2d0 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -6,7 +6,7 @@ * * 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 * If BUFFERPAGE0 is defined, then 0 will be used as a @@ -115,12 +115,13 @@ struct sbufdesc_unpadded { BufFlags flags; int16 bufsmgr; unsigned refcount; - char sb_dbname[NAMEDATALEN+1]; - char sb_relname[NAMEDATALEN+1]; #ifdef HAS_TEST_AND_SET slock_t io_in_progress_lock; #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 */ @@ -137,13 +138,13 @@ struct sbufdesc { int16 bufsmgr; /* storage manager id for buffer */ 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 /* can afford a dedicated lock if test-and-set locks are available */ slock_t io_in_progress_lock; #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 * 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 */ - 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)]; }; /* |