Commit: 0a38419f823a9389dc6383df994de19526d86c1b
Parent: 34671c2e1c01006a15c275966cb1631c3aeefc01
Author: Randy Palamar
Date: Mon, 21 Apr 2025 13:18:58 -0600
core: clear shared memory on startup
this avoids some annoying startup states while developing
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/static.c b/static.c
@@ -332,6 +332,7 @@ setup_beamformer(BeamformerCtx *ctx, Arena *memory)
ctx->shared_memory = os_open_shared_memory_area(OS_SMEM_NAME, BEAMFORMER_SHARED_MEMORY_SIZE);
if (!ctx->shared_memory)
os_fatal(s8("Get more ram lol\n"));
+ mem_clear(ctx->shared_memory, 0, sizeof(*ctx->shared_memory));
/* TODO(rnp): refactor - this is annoying */
ctx->shared_memory->parameters_sync = 1;
ctx->shared_memory->parameters_head_sync = 1;