|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Typedefs | |
| typedef struct PGShmemHeader | PGShmemHeader |
Enumerations | |
| enum | ShmemRequestKind { SHMEM_KIND_STRUCT = 0 , SHMEM_KIND_HASH , SHMEM_KIND_SLRU } |
Functions | |
| void | ShmemCallRequestCallbacks (void) |
| void | InitShmemAllocator (PGShmemHeader *seghdr) |
| void | ResetShmemAllocator (void) |
| void | ShmemRequestInternal (ShmemStructOpts *options, ShmemRequestKind kind) |
| size_t | ShmemGetRequestedSize (void) |
| void | ShmemInitRequested (void) |
| PGDLLIMPORT Size | pg_get_shmem_pagesize (void) |
| HTAB * | shmem_hash_create (void *location, size_t size, bool found, const char *name, int64 nelems, HASHCTL *infoP, int hash_flags) |
| void | shmem_hash_init (void *location, ShmemStructOpts *base_options) |
| void | shmem_hash_attach (void *location, ShmemStructOpts *base_options) |
| typedef struct PGShmemHeader PGShmemHeader |
Definition at line 28 of file shmem_internal.h.
| Enumerator | |
|---|---|
| SHMEM_KIND_STRUCT | |
| SHMEM_KIND_HASH | |
| SHMEM_KIND_SLRU | |
Definition at line 20 of file shmem_internal.h.
|
extern |
Definition at line 635 of file shmem.c.
References Assert, CACHELINEALIGN, HASHCTL::entrysize, ereport, errcode(), errmsg, ERROR, fb(), ShmemAllocatorData::free_offset, HASH_ELEM, HASH_ENTER, hash_estimate_size(), HASH_FIXED_SIZE, hash_search(), HASH_STRINGS, ShmemAllocatorData::index, ShmemAllocatorData::index_lock, ShmemAllocatorData::index_size, IsUnderPostmaster, HASHCTL::keysize, list_length(), LWLockInitialize(), MAXALIGN, pending_shmem_requests, result, shmem_hash_create(), SHMEM_INDEX_ADDITIONAL_SIZE, SHMEM_INDEX_KEYSIZE, ShmemAllocatorData::shmem_lock, ShmemAlloc(), ShmemAllocator, ShmemBase, ShmemEnd, ShmemIndex, ShmemSegHdr, SpinLockInit(), SRS_INITIAL, SRS_INITIALIZING, SRS_REQUESTING, and PGShmemHeader::totalsize.
Referenced by CreateSharedMemoryAndSemaphores().
|
extern |
Definition at line 1299 of file shmem.c.
References Assert, fb(), GetHugePageSize(), HUGE_PAGES_ON, huge_pages_status, HUGE_PAGES_UNKNOWN, and IsUnderPostmaster.
Referenced by pg_buffercache_os_pages_internal(), and pg_get_shmem_allocations_numa().
Definition at line 740 of file shmem.c.
References Assert, IsUnderPostmaster, NIL, pending_shmem_requests, and SRS_INITIAL.
Referenced by PostmasterStateMachine().
|
extern |
Definition at line 79 of file shmem_hash.c.
References Assert, fb(), HASH_ATTACH, and shmem_hash_create().
Referenced by AttachShmemIndexEntry().
|
extern |
Definition at line 149 of file shmem_hash.c.
References fb(), HASH_ALLOC, HASH_ATTACH, hash_create(), HASH_FIXED_SIZE, HASH_SHARED_MEM, name, shmem_hash_allocator::next, and ShmemHashAlloc().
Referenced by InitShmemAllocator(), shmem_hash_attach(), shmem_hash_init(), and ShmemInitHash().
|
extern |
Definition at line 63 of file shmem_hash.c.
References fb(), and shmem_hash_create().
Referenced by InitShmemIndexEntry().
Definition at line 974 of file shmem.c.
References Assert, fb(), lfirst, ShmemCallbacks::opaque_arg, registered_shmem_callbacks, ShmemCallbacks::request_fn, SRS_INITIAL, and SRS_REQUESTING.
Referenced by BootstrapModeMain(), PostgresSingleUserMain(), PostmasterMain(), and PostmasterStateMachine().
Definition at line 391 of file shmem.c.
References add_size(), CACHELINEALIGN, fb(), foreach_ptr, hash_estimate_size(), list_length(), pending_shmem_requests, PG_CACHE_LINE_SIZE, SHMEM_INDEX_ADDITIONAL_SIZE, and TYPEALIGN.
Referenced by CalculateShmemSize().
Definition at line 424 of file shmem.c.
References Assert, fb(), foreach_ptr, InitShmemIndexEntry(), IsUnderPostmaster, list_free_deep(), NIL, pending_shmem_requests, registered_shmem_callbacks, SRS_DONE, and SRS_INITIALIZING.
Referenced by CreateSharedMemoryAndSemaphores().
|
extern |
Definition at line 336 of file shmem.c.
References elog, ereport, errmsg, ERROR, fb(), foreach_ptr, IsUnderPostmaster, lappend(), palloc(), pending_shmem_requests, pg_nextpower2_size_t, SHMEM_ATTACH_UNKNOWN_SIZE, and SRS_REQUESTING.
Referenced by ShmemRequestHashWithOpts(), ShmemRequestStructWithOpts(), and SimpleLruRequestWithOpts().