RTEMS  5.0.0
protectedheap.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2007.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifndef _RTEMS_SCORE_PROTECTED_HEAP_H
19 #define _RTEMS_SCORE_PROTECTED_HEAP_H
20 
21 #include <rtems/score/heapimpl.h>
22 #include <rtems/score/apimutex.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
44  Heap_Control *heap,
45  void *area_begin,
46  uintptr_t area_size,
47  uintptr_t page_size
48 )
49 {
50  return _Heap_Initialize( heap, area_begin, area_size, page_size );
51 }
52 
59  Heap_Control *heap,
60  void *area_begin,
61  uintptr_t area_size
62 );
63 
68  Heap_Control *heap,
69  uintptr_t size,
70  uintptr_t alignment,
71  uintptr_t boundary
72 );
73 
78  Heap_Control *heap,
79  uintptr_t size,
80  uintptr_t alignment
81 )
82 {
83  return
84  _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
85 }
86 
92  Heap_Control *heap,
93  uintptr_t size
94 )
95 {
96  return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
97 }
98 
103  Heap_Control *heap,
104  void *addr,
105  uintptr_t *size
106 );
107 
114  Heap_Control *heap,
115  void *addr,
116  uintptr_t size
117 );
118 
124 bool _Protected_heap_Free( Heap_Control *heap, void *addr );
125 
129 bool _Protected_heap_Walk( Heap_Control *heap, int source, bool dump );
130 
135  Heap_Control *heap,
136  Heap_Block_visitor visitor,
137  void *visitor_arg
138 );
139 
146  Heap_Control *heap,
148 );
149 
156  Heap_Control *heap,
157  Heap_Information *info
158 );
159 
163 uintptr_t _Protected_heap_Get_size( Heap_Control *heap );
164 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #endif
172 /* end of include file */
uintptr_t _Protected_heap_Get_size(Heap_Control *heap)
See _Heap_Get_size().
Definition: pheapgetsize.c:24
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
uintptr_t _Heap_Initialize(Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t page_size)
Initializes the heap control block heap to manage the area starting at area_begin of size area_size b...
Definition: heap.c:201
Heap Handler Implementation.
Information block returned by _Heap_Get_information().
Definition: heapinfo.h:145
bool _Protected_heap_Extend(Heap_Control *heap, void *area_begin, uintptr_t area_size)
See _Heap_Extend().
Definition: pheapextend.c:24
bool _Protected_heap_Resize_block(Heap_Control *heap, void *addr, uintptr_t size)
See _Heap_Resize_block().
Definition: pheapresizeblock.c:24
RTEMS_INLINE_ROUTINE uintptr_t _Protected_heap_Initialize(Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t page_size)
See _Heap_Initialize().
Definition: protectedheap.h:43
bool _Protected_heap_Get_block_size(Heap_Control *heap, void *addr, uintptr_t *size)
See _Heap_Size_of_alloc_area().
Definition: pheapgetblocksize.c:24
RTEMS_INLINE_ROUTINE void * _Protected_heap_Allocate_aligned(Heap_Control *heap, uintptr_t size, uintptr_t alignment)
See _Heap_Allocate_aligned_with_boundary() with boundary equals zero.
Definition: protectedheap.h:77
API Mutex Handler API.
bool _Protected_heap_Free(Heap_Control *heap, void *addr)
See _Heap_Free().
Definition: pheapfree.c:24
Control block used to manage a heap.
Definition: heap.h:255
bool _Protected_heap_Get_free_information(Heap_Control *heap, Heap_Information *info)
See _Heap_Get_free_information().
Definition: pheapgetfreeinfo.c:24
Information about blocks.
Definition: heapinfo.h:125
bool _Protected_heap_Walk(Heap_Control *heap, int source, bool dump)
See _Heap_Walk().
Definition: pheapwalk.c:25
bool(* Heap_Block_visitor)(const Heap_Block *block, uintptr_t block_size, bool block_is_used, void *visitor_arg)
Heap block visitor.
Definition: heapimpl.h:172
void * _Protected_heap_Allocate_aligned_with_boundary(Heap_Control *heap, uintptr_t size, uintptr_t alignment, uintptr_t boundary)
See _Heap_Allocate_aligned_with_boundary().
Definition: pheapallocate.c:24
unsigned size
Definition: tte.h:74
RTEMS_INLINE_ROUTINE void * _Protected_heap_Allocate(Heap_Control *heap, uintptr_t size)
See _Heap_Allocate_aligned_with_boundary() with alignment and boundary equals zero.
Definition: protectedheap.h:91
void _Protected_heap_Iterate(Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg)
See _Heap_Iterate().
Definition: pheapiterate.c:29
bool _Protected_heap_Get_information(Heap_Control *heap, Heap_Information_block *info)
See _Heap_Get_information().
Definition: pheapgetinfo.c:24