#include <cmsis-plus/rtos/os-hooks.h>
#include <cmsis-plus/memory/first-fit-top.h>
#include <cmsis-plus/memory/lifo.h>
#include <cmsis-plus/memory/block-pool.h>
#include <cmsis-plus/estd/memory_resource>
Go to the source code of this file.
Typedefs | |
using | application_memory_resource = os::memory::first_fit_top |
using | rtos_memory_resource = os::memory::lifo |
Functions | |
void | os_rtos_application_out_of_memory_hook (void) |
Hook to handle out of memory in the application free store. | |
void | os_rtos_system_out_of_memory_hook (void) |
Hook to handle out of memory in the RTOS dynamic memory. | |
void | os_startup_initialize_free_store (void *heap_address, std::size_t heap_size_bytes) |
void * | sbrk (ptrdiff_t incr) |
Variables | |
static std::aligned_storage< sizeof(application_memory_resource), alignof(application_memory_resource)>::type | application_free_store |
Definition at line 54 of file initialise-free-store.cpp.
using rtos_memory_resource = os::memory::lifo |
Definition at line 60 of file initialise-free-store.cpp.
void os_startup_initialize_free_store | ( | void * | heap_address, |
std::size_t | heap_size_bytes | ||
) |
This routine is called after the hardware is initialised, before the static constructors, to initialise the application free store and the RTOS dynamic memory (when OS_INTEGER_RTOS_DYNAMIC_MEMORY_SIZE_BYTES
is defined).
If the RTOS is configured with its own memory, this area is dynamically allocated on the application free store. The RTOS memory resource (by default the one using LIFO) is also dynamically allocated on the application free store. (If it is free, why not use it; these areas are permanent anyway).
For special applications, it is possible to override this function entirely.
Definition at line 93 of file initialise-free-store.cpp.
void * sbrk | ( | ptrdiff_t | incr | ) |
|
static |
Definition at line 72 of file initialise-free-store.cpp.