Replace dynamic allocations with fixed-size buffers and add module extension filtering

- Use fixed STK_PATH_MAX and STK_MOD_ID_BUFFER throughout for predictable memory
- Filter by platform-specific extensions (.so/.dll/.dylib) with compile-time length
- Add RELOAD event detection and is_module_loaded() helper
- Maintain feature parity across all platforms
This commit is contained in:
2026-01-17 19:52:42 +01:00
parent e2e49e605c
commit 38469a358f
4 changed files with 365 additions and 333 deletions
+4 -2
View File
@@ -4,8 +4,10 @@
#include "stk_version.h"
#include <stdlib.h>
#define MOD_DIR_BUFFER_SIZE 32
#define PATH_BUFFER_SIZE 1024
#define STK_MOD_DIR_BUFFER 256
#define STK_MOD_ID_BUFFER 64
#define STK_PATH_MAX 256
#define STK_PATH_MAX_OS 4096
#ifdef __cplusplus
extern "C" {