Veil
MemContext Struct Reference

MemContexts are large single chunks of shared memory from which smaller allocations may be made. More...

#include <veil_shmem.h>

Data Fields

Oid db_id
 Identifier for the database for which this context was created, or by which it has been taken over. More...
 
LWLock * lwlock
 The LWLock associated with this memory context.
 
size_t next
 Offset of 1st free byte.
 
size_t limit
 Offset, of 1st byte beyond this struct.
 
LWLockPadded * lwlock_tranche
 A tranche of lwlocks (only used in the zeroth MemContext. More...
 
int lwlock_idx
 Index into the above. More...
 
struct ShmemCtlmemctl
 Pointer to shared memory control structure. More...
 
void * memory [0]
 The rest of the chunk, from which memory is allocated.
 

Detailed Description

MemContexts are large single chunks of shared memory from which smaller allocations may be made.

Definition at line 54 of file veil_shmem.h.

Field Documentation

◆ db_id

Oid MemContext::db_id

Identifier for the database for which this context was created, or by which it has been taken over.

Definition at line 55 of file veil_shmem.h.

Referenced by get_shmem_context().

◆ lwlock_tranche

LWLockPadded* MemContext::lwlock_tranche

A tranche of lwlocks (only used in the zeroth MemContext.

Definition at line 64 of file veil_shmem.h.

Referenced by get_shmem_context(), and NextLWLock().

◆ lwlock_idx

int MemContext::lwlock_idx

Index into the above.

Definition at line 66 of file veil_shmem.h.

Referenced by get_shmem_context(), and NextLWLock().

◆ memctl

struct ShmemCtl* MemContext::memctl

Pointer to shared memory control structure.

Definition at line 67 of file veil_shmem.h.

Referenced by shmalloc_init().


The documentation for this struct was generated from the following file: