123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- #ifndef MEM_MANAGER_H__
- #define MEM_MANAGER_H__
- #include "sdk_common.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- uint32_t nrf_mem_init(void);
- uint32_t nrf_mem_reserve(uint8_t ** pp_buffer, uint32_t * p_size);
- void * nrf_malloc(uint32_t size);
- void * nrf_calloc(uint32_t nmemb, uint32_t size);
- void nrf_free(void * p_buffer);
- void * nrf_realloc(void *p_buffer, uint32_t size);
- #if defined(MEM_MANAGER_ENABLE_DIAGNOSTICS) && (MEM_MANAGER_ENABLE_DIAGNOSTICS == 1)
- void nrf_mem_diagnose(void);
- void nrf_mem_diagnose_reset(void);
- #define NRF_MEM_MANAGER_DIAGNOSE nrf_mem_diagnose()
- #define NRF_MEM_MANAGER_DIAGNOSE_RESET nrf_mem_diagnose_reset()
- #else
- #define NRF_MEM_MANAGER_DIAGNOSE
- #define NRF_MEM_MANAGER_DIAGNOSE_RESET
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
|