mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-27 13:52:14 +00:00
Added dual-class PSRAM/TLSF allocator system and refactored memory management
Introduces a flexible two-class allocator architecture (RNS_DEFAULT_ALLOCATOR and RNS_CONTAINER_ALLOCATOR) supporting heap, PSRAM, and TLSF pool variants for fine-grained control over embedded memory layout. - New Memory.h/cpp with ContainerAllocator<T>, heap/PSRAM/pool allocator types, and heap stats reporting - IdentityTable and PathTable now use ContainerAllocator - Replaced RNS_USE_TLSF/RNS_USE_ALLOCATOR/RNS_USE_PSRAM flags with per-class allocator flags (RNS_DEFAULT_ALLOCATOR, RNS_CONTAINER_ALLOCATOR) - Added ESP32 PSRAM allocator support (RNS_PSRAM_ALLOCATOR, RNS_PSRAM_POOL_ALLOCATOR) - Added Transport::get_path()/remove_path() helpers - Added loop callback (set_loop_callback) to enable more responsive app during long operations (like clean_cache) - Aded guard against re-entrancy to clean_cache() - Added callback option to list_directory() to avoid heap allocation - Added OOM auto-restart (ESP.restart/NVIC_SystemReset) in Interface send/receive and Reticulum loop. - Renamed setLogCallback to set_log_callback - Made Link/Identity static members private - Added native14 env to CI and platformio.ini - Bumped version to 0.2.10
This commit is contained in:
1 parent
49ccbc2827
commit
4d6f0b9de2
32 files changed
+1485
-985
No files matched your search
@@ -659,8 +659,8 @@ int runUnityTests(void) {
|
||||
UNITY_BEGIN();
|
||||
|
||||
// Suite-level setup
|
||||
RNS::Utilities::OS::dump_heap_stats();
|
||||
size_t pre_memory = RNS::Utilities::OS::heap_available();
|
||||
RNS::Utilities::Memory::dump_heap_stats();
|
||||
size_t pre_memory = RNS::Utilities::Memory::heap_available();
|
||||
TRACEF("testBytes: pre-mem: %u", pre_memory);
|
||||
|
||||
// Run tests
|
||||
@@ -686,7 +686,7 @@ int runUnityTests(void) {
|
||||
RUN_TEST(test_mid_zero_size_bytes);
|
||||
|
||||
// Suite-level teardown
|
||||
size_t post_memory = RNS::Utilities::OS::heap_available();
|
||||
size_t post_memory = RNS::Utilities::Memory::heap_available();
|
||||
size_t diff_memory = (int)pre_memory - (int)post_memory;
|
||||
TRACEF("testBytes: post-mem: %u", post_memory);
|
||||
TRACEF("testBytes: diff-mem: %u", diff_memory);
|
||||
|
||||
Reference in new issue
Block a user