From bdfea870024b8efd0a0bd16f8978482d8bbf9ed9 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 1 Jun 2026 08:41:34 +0200 Subject: 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 Signed-off-by: Sander Vrijders --- cmake/config/ssm.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmake/config/ssm.cmake') 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) -- cgit v1.2.3