PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | DSM_IMPL_POSIX 1 |
#define | DSM_IMPL_SYSV 2 |
#define | DSM_IMPL_WINDOWS 3 |
#define | DSM_IMPL_MMAP 4 |
#define | USE_DSM_SYSV |
#define | DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE DSM_IMPL_SYSV |
#define | USE_DSM_MMAP |
#define | PG_DYNSHMEM_DIR "pg_dynshmem" |
#define | PG_DYNSHMEM_MMAP_FILE_PREFIX "mmap." |
#define | DSM_HANDLE_INVALID ((dsm_handle) 0) |
Typedefs | |
typedef uint32 | dsm_handle |
Enumerations | |
enum | dsm_op { DSM_OP_CREATE , DSM_OP_ATTACH , DSM_OP_DETACH , DSM_OP_DESTROY } |
Functions | |
bool | dsm_impl_op (dsm_op op, dsm_handle handle, Size request_size, void **impl_private, void **mapped_address, Size *mapped_size, int elevel) |
void | dsm_impl_pin_segment (dsm_handle handle, void *impl_private, void **impl_private_pm_handle) |
void | dsm_impl_unpin_segment (dsm_handle handle, void **impl_private) |
Variables | |
PGDLLIMPORT int | dynamic_shared_memory_type |
PGDLLIMPORT int | min_dynamic_shared_memory |
#define DEFAULT_DYNAMIC_SHARED_MEMORY_TYPE DSM_IMPL_SYSV |
Definition at line 36 of file dsm_impl.h.
#define DSM_HANDLE_INVALID ((dsm_handle) 0) |
Definition at line 58 of file dsm_impl.h.
#define DSM_IMPL_MMAP 4 |
Definition at line 20 of file dsm_impl.h.
#define DSM_IMPL_POSIX 1 |
Definition at line 17 of file dsm_impl.h.
#define DSM_IMPL_SYSV 2 |
Definition at line 18 of file dsm_impl.h.
#define DSM_IMPL_WINDOWS 3 |
Definition at line 19 of file dsm_impl.h.
#define PG_DYNSHMEM_DIR "pg_dynshmem" |
Definition at line 51 of file dsm_impl.h.
#define PG_DYNSHMEM_MMAP_FILE_PREFIX "mmap." |
Definition at line 52 of file dsm_impl.h.
#define USE_DSM_MMAP |
Definition at line 38 of file dsm_impl.h.
#define USE_DSM_SYSV |
Definition at line 34 of file dsm_impl.h.
typedef uint32 dsm_handle |
Definition at line 55 of file dsm_impl.h.
enum dsm_op |
Enumerator | |
---|---|
DSM_OP_CREATE | |
DSM_OP_ATTACH | |
DSM_OP_DETACH | |
DSM_OP_DESTROY |
Definition at line 61 of file dsm_impl.h.
bool dsm_impl_op | ( | dsm_op | op, |
dsm_handle | handle, | ||
Size | request_size, | ||
void ** | impl_private, | ||
void ** | mapped_address, | ||
Size * | mapped_size, | ||
int | elevel | ||
) |
Definition at line 159 of file dsm_impl.c.
References Assert, dsm_impl_mmap(), DSM_IMPL_MMAP, dsm_impl_posix(), DSM_IMPL_POSIX, dsm_impl_sysv(), DSM_IMPL_SYSV, DSM_IMPL_WINDOWS, DSM_OP_ATTACH, DSM_OP_CREATE, dynamic_shared_memory_type, elog, and ERROR.
Referenced by dsm_attach(), dsm_backend_startup(), dsm_cleanup_using_control_segment(), dsm_create(), dsm_detach(), dsm_detach_all(), dsm_postmaster_shutdown(), dsm_postmaster_startup(), and dsm_unpin_segment().
void dsm_impl_pin_segment | ( | dsm_handle | handle, |
void * | impl_private, | ||
void ** | impl_private_pm_handle | ||
) |
Definition at line 963 of file dsm_impl.c.
References _dosmaperr(), DSM_IMPL_WINDOWS, dynamic_shared_memory_type, ereport, errcode_for_dynamic_shared_memory(), errmsg(), ERROR, IsUnderPostmaster, name, SEGMENT_NAME_PREFIX, and snprintf.
Referenced by dsm_pin_segment().
void dsm_impl_unpin_segment | ( | dsm_handle | handle, |
void ** | impl_private | ||
) |
Definition at line 1014 of file dsm_impl.c.
References _dosmaperr(), DSM_IMPL_WINDOWS, dynamic_shared_memory_type, ereport, errcode_for_dynamic_shared_memory(), errmsg(), ERROR, IsUnderPostmaster, name, SEGMENT_NAME_PREFIX, and snprintf.
Referenced by dsm_unpin_segment().
|
extern |
Definition at line 112 of file dsm_impl.c.
Referenced by dsm_impl_op(), dsm_impl_pin_segment(), dsm_impl_unpin_segment(), and dsm_postmaster_startup().
|
extern |
Definition at line 115 of file dsm_impl.c.
Referenced by dsm_estimate_size().