Module to manage dynamically allocated memory used by nrf_crypto APIs. More...
Macros |
|
| #define | NRF_CRYPTO_ALLOC (size) |
|
Defines memory allocation function for nrf_crypto.
More...
|
|
| #define | NRF_CRYPTO_FREE (p_buffer) |
|
Defines memory deallocation function for nrf_crypto.
More...
|
|
| #define | NRF_CRYPTO_ALLOC_ON_STACK |
|
Contains 1 if memory allocated by
NRF_CRYPTO_ALLOC
is on stack or 0 otherwise.
More...
|
|
Detailed Description
Module to manage dynamically allocated memory used by nrf_crypto APIs.
NRF_CRYPTO_ALLOCATOR definition is used to configure this module.
Macro Definition Documentation
| #define NRF_CRYPTO_ALLOC | ( | size | ) |
Defines memory allocation function for nrf_crypto.
This macro is used internally by nrf_crypto library to allocate temporary memory. It is not intended to be used outside nrf_crypto library. How memory is actually allocated is configured by NRF_CRYPTO_ALLOCATOR definition.
If user macros are selected by NRF_CRYPTO_ALLOCATOR then this macro have to be defined by the user in "nrf_crypto_allocator.h" file. The file will be included into "nrf_crypto_mem.h".
If NRF_CRYPTO_ALLOC_ON_STACK is 1 then this function will allocate data on stack, so make sure that returned pointer is not used outside the caller function.
- Parameters
-
size Number of bytes to allocate.
- Returns
- Pointer to newly allocated memory or NULL on error.
| #define NRF_CRYPTO_ALLOC_ON_STACK |
Contains 1 if memory allocated by NRF_CRYPTO_ALLOC is on stack or 0 otherwise.
This definition is used internally by nrf_crypto library. It is not intended to be used outside nrf_crypto library.
If user macros are selected by NRF_CRYPTO_ALLOCATOR then this macro have to be defined by the user in "nrf_crypto_allocator.h" file. The file will be included into "nrf_crypto_mem.h".
| #define NRF_CRYPTO_FREE | ( | p_buffer | ) |
Defines memory deallocation function for nrf_crypto.
This macro is used internally by nrf_crypto library to deallocate temporary memory. It is not intended to be used outside nrf_crypto library.
If user macros are selected by NRF_CRYPTO_ALLOCATOR then this macro have to be defined by the user in "nrf_crypto_allocator.h" file. The file will be included into "nrf_crypto_mem.h".
- Parameters
-
p_buffer Pointer to memory buffer for deallocation.