Commit Graph
7 Commits
Author SHA1 Message Date
Chad Attermann fcfda66365 WIP: General improvements in persistence efficiency 2024-08-14 21:59:23 -06:00
Chad Attermann 3af5111606 WIP: Logging optimizations and memory management
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.
2024-07-16 10:40:46 -06:00
Chad Attermann 36ff1c5f00 WIP: Refactored logging to use macros 2024-07-03 11:30:01 -06:00
Chad Attermann 2d3b3d586f WIP: Improved heap management 2024-07-03 10:57:27 -06:00
Chad Attermann bef8dbc1b0 WIP: Stable memory and flash with limited paths 2024-07-03 06:55:06 -06:00
Chad Attermann 518db13ec8 WIP: Switched to macros for build control of logs 2024-07-01 20:25:46 -06:00
Chad Attermann cc25dbab8f WIP: Major improvements in memory management 2024-07-01 20:12:51 -06:00