Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
ns_conf.h File Reference
Nanostack configuration API. More...
Go to the source code of this file.
Functions | |
int | ns_conf_gc_threshold_set (uint8_t percentage_high, uint8_t percentage_critical) |
Set threshold for memory garbage collection. | |
int | ns_conf_packet_ingress_rate_limit_by_mem (uint8_t free_heap_percentage) |
Limit amount of incoming packets if system does not have enough free memory. |
Detailed Description
Nanostack configuration API.
Definition in file ns_conf.h.
Function Documentation
int ns_conf_gc_threshold_set | ( | uint8_t | percentage_high, |
uint8_t | percentage_critical | ||
) |
Set threshold for memory garbage collection.
Nanostack heap usage is monitored in regular intervals. If too much memory has been used then garbage collection (GC) is triggered. GC has two adjustable thresholds: HIGH and CRITICAL. HIGH threshold is lower one and once exceeded a GC will try to release memory that is used for caching. When CRITTICAL threshold is exceeded them GC will try to release memory more aggressiveliy.
Nanostack memory monitoring can only work if memory statistics are enabled in nsdynmemLIB.
- Parameters:
-
percentage_high Percentage of total heap when garbage collection is first time triggered percentage_critical Percentage of total heap when critical garbage collection is triggered
- Returns:
- 0 in success, negative value in case of error.
int ns_conf_packet_ingress_rate_limit_by_mem | ( | uint8_t | free_heap_percentage ) |
Limit amount of incoming packets if system does not have enough free memory.
Memory statistics must been initialized in nsdynmemLIB to get this feature working.
- Parameters:
-
free_heap_percentage Percentage of free heap that must be available when packet arrives to MAC layer.
- Returns:
- 0 in case of success, <0 otherwise.
Generated on Tue Jul 12 2022 13:55:17 by
