1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Another round of cleanups for dynahash.c (maybe it's finally clean of

portability issues).  Caller-visible data structures are now allocated
on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'.
Rejigger hash_create API so that caller specifies size of key and
total size of entry, not size of key and size of rest of entry.
This simplifies life considerably since each number is just a sizeof(),
and padding issues etc. are taken care of automatically.
This commit is contained in:
Tom Lane
2001-10-01 05:36:17 +00:00
parent f58179669a
commit 5999e78fc4
17 changed files with 524 additions and 682 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: shmem.h,v 1.31 2001/09/29 04:02:27 tgl Exp $
* $Id: shmem.h,v 1.32 2001/10/01 05:36:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -73,9 +73,7 @@ extern void *ShmemInitStruct(char *name, Size size, bool *foundPtr);
/* size constants for the shmem index table */
/* max size of data structure string name */
#define SHMEM_INDEX_KEYSIZE (50)
/* data in shmem index table hash bucket */
#define SHMEM_INDEX_DATASIZE (sizeof(ShmemIndexEnt) - SHMEM_INDEX_KEYSIZE)
#define SHMEM_INDEX_KEYSIZE (48)
/* maximum size of the shmem index table */
#define SHMEM_INDEX_SIZE (100)