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
Converted log calls across src/, examples/, and test/ to use DEBUGF/TRACEF/ERRORF/etc. macros instead of std::string + operator+. This eliminates temporary heap allocations on every log call, which matters on memory-constrained MCUs.
Fix for link validation failure when poackets contain new MTU in payload
from RNS 1.0 (courtesy of @jlpoolen).
Optimization of announce re-broadcasts from RNS 1.0.
Added support for new `context_flag` in RNS packet header that is used
to indicate the use of ratchets.
Note that ratchet support is still missing from the implementation, but
this fix enables received ratchets to be able to handled gracefully.
Changed a few key logs to use printf-style instead of string
concatenation to avoid dynamic memory allocation. Still need to move
all remaining logging over to printf-style.
Added option (-DRNS_USE_ALLOCATOR=1) to override new/delete operators for
both allocation metrics and the ability to implement an alternate memory
allocator.
Added option (-DRNS_USE_TLSF=1) to use the alternate TLSF allocator
(must also define RNS_USE_ALLOCATOR). This allocator is well known for
reducing fragmentation and providing constant, O(1)-time allocation
and deallocation for real-time embedded systems.
This TLSF allocator appears to already be the default allocator for
ESP32 boards, but the allocator used by NRF52 is unknown at this time so
the TLSF allocator internal to microReticulum is only being used for
NRF52 boards at this time.
Future memory management improvements will include custom allocators for
long-lived structures like the path table that will segregate them from
the general pool of memory that is constantly cycling, thereby further
reducing fragmentation. It will also allow these structures to use
alternate memory like PSRAM present on T-Beam boards.
Moved LoRa and UDP test code into `examples` folder.
Moved `main.cpp` test app to `examples` folder.
Removed platform-specific filesystem code and replaced with an interface
to be implemeneted by the consumer.