RTEMS 6.1-rc7
Loading...
Searching...
No Matches
Files | Data Structures | Macros | Functions | Variables
Memory Handler

This group contains the Memory Handler implementation. More...

Files

file  bspgetworkarea.c
 This source file contains the arm/altera-cyclone-v implementation of _Memory_Get().
 
file  bspgetworkarea.c
 This source file contains the i386/pc386 implementation of _Memory_Get().
 
file  bspgetworkarea.c
 This source file contains the powerpc/mpc55xxevb implementation of _Memory_Get().
 
file  bspgetworkarea.c
 This source file contains the powerpc/tqm8xx implementation of _Memory_Get().
 
file  bspgetworkarea-default.c
 This source file contains the default implementation of _Memory_Get().
 
file  bspgetworkarea.c
 This source file contains an implementation of _Memory_Get().
 
file  memory.h
 This header file provides the interfaces of the Memory Handler.
 
file  memoryallocate.c
 This source file contains the implementation of _Memory_Allocate().
 
file  memorydirtyfreeareas.c
 This source file contains the implementation of _Memory_Dirty_free_areas().
 
file  memoryfill.c
 This source file contains the implementation of _Memory_Fill().
 
file  memorynoinit.c
 This source file contains the definition of _Memory_Noinit_begin and _Memory_Noinit_end.
 
file  memoryzerobeforeuse.c
 This source file contains the definition of _Memory_Zero_before_use.
 
file  memoryzerofreeareas.c
 This source file contains the implementation of _Memory_Zero_free_areas().
 

Data Structures

struct  Memory_Area
 The memory area description. More...
 
struct  Memory_Information
 The memory information. More...
 

Macros

#define MEMORY_INFORMATION_INITIALIZER(areas)    { RTEMS_ARRAY_SIZE( areas ), ( areas ) }
 Statically initialize a memory information.
 
#define MEMORY_INITIALIZER(begin, end)   { ( begin ), ( begin ), ( end ) }
 Statically initialize a memory area.
 

Functions

const Memory_Information_Memory_Get (void)
 Return the memory information of this platform.
 
void * _Memory_Allocate (const Memory_Information *information, uintptr_t size, uintptr_t alignment)
 Allocate a memory area from the memory information.
 
void _Memory_Fill (const Memory_Information *information, int c)
 Fill all free memory areas of the memory information with a constant byte.
 
void _Memory_Zero_free_areas (void)
 Zeros all free memory areas of the system.
 
void _Memory_Dirty_free_areas (void)
 Dirty all free memory areas of the system.
 

Variables

const bool _Memory_Zero_before_use
 Indicates if the memory is zeroed during system initialization.
 
char _Memory_Noinit_begin []
 This symbol marks the begin of the non-initialized section used by RTEMS.
 
char _Memory_Noinit_end []
 This symbol marks the end of the non-initialized section used by RTEMS.
 

Detailed Description

This group contains the Memory Handler implementation.

The Memory Handler provides memory areas supplied by the BSP to higher level memory consumers such as the Workspace Handler and the Malloc Support.

Macro Definition Documentation

◆ MEMORY_INFORMATION_INITIALIZER

#define MEMORY_INFORMATION_INITIALIZER (   areas)     { RTEMS_ARRAY_SIZE( areas ), ( areas ) }

Statically initialize a memory information.

Parameters
areasThe designator of an array of the memory areas.

◆ MEMORY_INITIALIZER

#define MEMORY_INITIALIZER (   begin,
  end 
)    { ( begin ), ( begin ), ( end ) }

Statically initialize a memory area.

Parameters
beginThe begin of the memory area.
endThe end of the memory area.

Function Documentation

◆ _Memory_Allocate()

void * _Memory_Allocate ( const Memory_Information information,
uintptr_t  size,
uintptr_t  alignment 
)

Allocate a memory area from the memory information.

It is not possible to free the memory area allocated by this function.

Parameters
informationThe memory information.
sizeThe size in bytes of the memory area to allocate.
alignmentThe alignment in bytes of the memory area to allocate. It must be a power of two.
Return values
NULLNo such memory area available.
beginThe begin of the allocated memory area.

◆ _Memory_Fill()

void _Memory_Fill ( const Memory_Information information,
int  c 
)

Fill all free memory areas of the memory information with a constant byte.

Parameters
informationThe memory information.
cThe constant byte to fill the free memory areas.

◆ _Memory_Get()

const Memory_Information * _Memory_Get ( void  )

Return the memory information of this platform.

This function is provided by the Board Support Package (BSP). Using a function gives the BSPs a bit more freedom with respect to the implementation. Calling this function shall not have side-effects. Initialization steps to set up the memory information shall be done in a system initialization handler (RTEMS_SYSINIT_MEMORY).

Returns
The memory information.

Variable Documentation

◆ _Memory_Zero_before_use

const bool _Memory_Zero_before_use
extern

Indicates if the memory is zeroed during system initialization.

This value is provided via <rtems/confdefs.h> in case CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY is defined.