mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Redesign the patch for allocation of shmem space and LWLocks for add-on
modules; the first try was not usable in EXEC_BACKEND builds (e.g., Windows). Instead, just provide some entry points to increase the allocation requests during postmaster start, and provide a dedicated LWLock that can be used to synchronize allocation operations performed by backends. Per discussion with Marc Munro.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.48 2006/08/01 19:03:11 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/storage/shmem.h,v 1.49 2006/10/15 22:04:08 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -38,11 +38,6 @@ typedef unsigned long SHMEM_OFFSET;
|
||||
extern DLLIMPORT SHMEM_OFFSET ShmemBase;
|
||||
|
||||
|
||||
/* coerce an offset into a pointer in a specified address space. This
|
||||
* macro (only) is not confined to the primary shared memory region */
|
||||
#define MAKE_PTRFROM(base,xx_offs)\
|
||||
(base+((unsigned long)(xx_offs)))
|
||||
|
||||
/* coerce an offset into a pointer in this process's address space */
|
||||
#define MAKE_PTR(xx_offs)\
|
||||
(ShmemBase+((unsigned long)(xx_offs)))
|
||||
@@ -77,6 +72,9 @@ extern void *ShmemInitStruct(const char *name, Size size, bool *foundPtr);
|
||||
extern Size add_size(Size s1, Size s2);
|
||||
extern Size mul_size(Size s1, Size s2);
|
||||
|
||||
/* ipci.c */
|
||||
extern void RequestAddinShmemSpace(Size size);
|
||||
|
||||
/* size constants for the shmem index table */
|
||||
/* max size of data structure string name */
|
||||
#define SHMEM_INDEX_KEYSIZE (48)
|
||||
|
||||
Reference in New Issue
Block a user