RTEMS  5.0.0
Data Structures | Macros | Typedefs | Functions
heap.h File Reference

Heap Handler API. More...

#include <rtems/score/cpu.h>
#include <rtems/score/heapinfo.h>

Go to the source code of this file.

Data Structures

struct  Heap_Block
 Description for free or used blocks. More...
 
struct  Heap_Control
 Control block used to manage a heap. More...
 
struct  Heap_Area
 Heap area structure for table based heap initialization and extension. More...
 

Macros

#define HEAP_PROTECTION_HEADER_SIZE   0
 
#define HEAP_BLOCK_HEADER_SIZE   (2 * sizeof(uintptr_t) + HEAP_PROTECTION_HEADER_SIZE)
 The block header consists of the two size fields (Heap_Block::prev_size and Heap_Block::size_and_flag).
 

Typedefs

typedef struct Heap_Control Heap_Control
 
typedef struct Heap_Block Heap_Block
 
typedef uintptr_t(* Heap_Initialization_or_extend_handler) (Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t page_size_or_unused)
 Heap initialization and extend handler type. More...
 

Functions

uintptr_t _Heap_Extend (Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t unused)
 Extends the memory available for the heap heap using the memory area starting at area_begin of size area_size bytes. More...
 
uintptr_t _Heap_No_extend (Heap_Control *unused_0, void *unused_1, uintptr_t unused_2, uintptr_t unused_3)
 This function returns always zero. More...
 
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up (uintptr_t value, uintptr_t alignment)
 
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Min_block_size (uintptr_t page_size)
 
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Area_overhead (uintptr_t page_size)
 Returns the worst case overhead to manage a memory area.
 
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Size_with_overhead (uintptr_t page_size, uintptr_t size, uintptr_t alignment)
 Returns the size with administration and alignment overhead for one allocation.
 

Detailed Description

Heap Handler API.