/* Shared-memory state for a dynamic shared memory segment. */ typedef struct dsm_control_item { dsm_handle handle; uint32 refcnt; /* 2+ = active, 1 = moribund, 0 = gone */ void *impl_private_pm_handle; /* only needed on Windows */ bool pinned; } dsm_control_item; /* Layout of the dynamic shared memory control segment. */ typedef struct dsm_control_header { uint32 magic; uint32 nitems; uint32 maxitems; dsm_control_item item[FLEXIBLE_ARRAY_MEMBER]; } dsm_control_header; static dsm_control_header *dsm_control;