µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
initialise-free-store.cpp File Reference

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
 

Typedef Documentation

◆ application_memory_resource

◆ rtos_memory_resource

Function Documentation

◆ os_startup_initialize_free_store()

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 82 of file initialise-free-store.cpp.

◆ sbrk()

void * sbrk ( ptrdiff_t  incr)

Variable Documentation

◆ application_free_store

std::aligned_storage<sizeof(application_memory_resource),alignof(application_memory_resource)>::type application_free_store
static

Definition at line 61 of file initialise-free-store.cpp.