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:
+4
-2
@@ -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" {
|
||||
|
||||
Reference in New Issue
Block a user