diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-06-01 08:41:34 +0200 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-06-03 08:02:34 +0200 |
| commit | bdfea870024b8efd0a0bd16f8978482d8bbf9ed9 (patch) | |
| tree | 74871a873dd49cb35fe3390b241638286621b86f /cmake/config | |
| parent | b88c120f68b0e9f779fa0071a2ad095b93d5aaf6 (diff) | |
| download | ouroboros-bdfea870024b8efd0a0bd16f8978482d8bbf9ed9.tar.gz ouroboros-bdfea870024b8efd0a0bd16f8978482d8bbf9ed9.zip | |
lib: Reclaim aged leaked ssm pool blocks
The reclaim_pid_from_sc() function reaped any block allocated with
refcount from a dead PID, but cross-process hand-offs can leave a
block briefly allocated by the producer while a live consumer still
holds it. This skips reclaim within SSM_POOL_RECLAIM_AGE_S (default
60s) so in-flight hand-offs survive a producer crash.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'cmake/config')
| -rw-r--r-- | cmake/config/ssm.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/config/ssm.cmake b/cmake/config/ssm.cmake index 26604f70..589171ea 100644 --- a/cmake/config/ssm.cmake +++ b/cmake/config/ssm.cmake @@ -29,6 +29,8 @@ set(SSM_FLOW_SET_PREFIX "/${SHM_PREFIX}.set." CACHE INTERNAL # Number of shards per size class for reducing contention set(SSM_POOL_SHARDS 4 CACHE STRING "Number of allocator shards per size class") +set(SSM_POOL_RECLAIM_AGE_S 60 CACHE STRING + "Minimum age in seconds before a block is presumed stale and reclaimed") # Global Shared Packet Pool (GSPP) - for privileged processes # Shared by all processes in 'ouroboros' group (~60 MB total) |
