mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-22 23:10:38 +00:00
Additional defines for tuning memory usage
Added more defines for setting storage and persistence limits: - RNS_RATE_TIMESTAMPS_MAX - RNS_RANDOM_BLOBS_PERSIST_MAX - RNS_RANDOM_BLOBS_MAX
This commit is contained in:
1 parent
f5a23a5a56
commit
b0681fe33f
1 file changed
+19
-5
+19
-5
@@ -5,12 +5,26 @@
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifndef RNS_QUEUED_ANNOUNCES_MAX
|
||||
#define RNS_QUEUED_ANNOUNCES_MAX 20
|
||||
#endif
|
||||
|
||||
#ifndef RNS_RECEIPTS_MAX
|
||||
#define RNS_RECEIPTS_MAX 20
|
||||
#endif
|
||||
|
||||
#ifndef RNS_QUEUED_ANNOUNCES_MAX
|
||||
#define RNS_QUEUED_ANNOUNCES_MAX 20
|
||||
#ifndef RNS_RATE_TIMESTAMPS_MAX
|
||||
#define RNS_RATE_TIMESTAMPS_MAX 16
|
||||
#endif
|
||||
|
||||
#ifndef RNS_RANDOM_BLOBS_PERSIST_MAX
|
||||
//#define RNS_RANDOM_BLOBS_PERSIST_MAX 32
|
||||
#define RNS_RANDOM_BLOBS_PERSIST_MAX 16
|
||||
#endif
|
||||
|
||||
#ifndef RNS_RANDOM_BLOBS_MAX
|
||||
//#define RNS_RANDOM_BLOBS_MAX 64
|
||||
#define RNS_RANDOM_BLOBS_MAX 32
|
||||
#endif
|
||||
|
||||
|
||||
@@ -436,9 +450,9 @@ namespace RNS { namespace Type {
|
||||
static const uint16_t REVERSE_TIMEOUT = 30*60; // Reverse table entries are removed after 30 minutes
|
||||
// CBA MCU
|
||||
static const uint16_t MAX_RECEIPTS = RNS_RECEIPTS_MAX; // Maximum number of receipts to keep track of
|
||||
static const uint8_t MAX_RATE_TIMESTAMPS = 16; // Maximum number of announce timestamps to keep per destination
|
||||
static const uint8_t PERSIST_RANDOM_BLOBS = 32; // Maximum number of random blobs per destination to persist to disk
|
||||
static const uint8_t MAX_RANDOM_BLOBS = 64; // Maximum number of random blobs per destination to keep in memory
|
||||
static const uint8_t MAX_RATE_TIMESTAMPS = RNS_RATE_TIMESTAMPS_MAX; // Maximum number of announce timestamps to keep per destination
|
||||
static const uint8_t PERSIST_RANDOM_BLOBS = RNS_RANDOM_BLOBS_PERSIST_MAX; // Maximum number of random blobs per destination to persist to disk
|
||||
static const uint8_t MAX_RANDOM_BLOBS = RNS_RANDOM_BLOBS_MAX; // Maximum number of random blobs per destination to keep in memory
|
||||
|
||||
// CBA MCU
|
||||
//static const uint32_t DESTINATION_TIMEOUT = 60*60*24*7; // Destination table entries are removed if unused for one week
|
||||
|
||||
Reference in new issue
Block a user