|
135 | 135 | /* Only include heap related functions and structs if using dynamic allocation */
|
136 | 136 | #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
137 | 137 |
|
138 |
| - /* Used by heap_5.c to define the start address and size of each memory region |
139 |
| - * that together comprise the total FreeRTOS heap space. */ |
| 138 | +/* Used by heap_5.c to define the start address and size of each memory region |
| 139 | + * that together comprise the total FreeRTOS heap space. */ |
140 | 140 | typedef struct HeapRegion
|
141 | 141 | {
|
142 | 142 | uint8_t * pucStartAddress;
|
143 | 143 | size_t xSizeInBytes;
|
144 | 144 | } HeapRegion_t;
|
145 | 145 |
|
146 |
| - /* Used to pass information about the heap out of vPortGetHeapStats(). */ |
| 146 | +/* Used to pass information about the heap out of vPortGetHeapStats(). */ |
147 | 147 | typedef struct xHeapStats
|
148 | 148 | {
|
149 | 149 | size_t xAvailableHeapSpaceInBytes; /* The total heap size currently available - this is the sum of all the free blocks, not the largest block that can be allocated. */
|
|
155 | 155 | size_t xNumberOfSuccessfulFrees; /* The number of calls to vPortFree() that has successfully freed a block of memory. */
|
156 | 156 | } HeapStats_t;
|
157 | 157 |
|
158 |
| - /* |
159 |
| - * Used to define multiple heap regions for use by heap_5.c. This function |
160 |
| - * must be called before any calls to pvPortMalloc() - not creating a task, |
161 |
| - * queue, semaphore, mutex, software timer, event group, etc. will result in |
162 |
| - * pvPortMalloc being called. |
163 |
| - * |
164 |
| - * pxHeapRegions passes in an array of HeapRegion_t structures - each of which |
165 |
| - * defines a region of memory that can be used as the heap. The array is |
166 |
| - * terminated by a HeapRegions_t structure that has a size of 0. The region |
167 |
| - * with the lowest start address must appear first in the array. |
168 |
| - */ |
| 158 | +/* |
| 159 | + * Used to define multiple heap regions for use by heap_5.c. This function |
| 160 | + * must be called before any calls to pvPortMalloc() - not creating a task, |
| 161 | + * queue, semaphore, mutex, software timer, event group, etc. will result in |
| 162 | + * pvPortMalloc being called. |
| 163 | + * |
| 164 | + * pxHeapRegions passes in an array of HeapRegion_t structures - each of which |
| 165 | + * defines a region of memory that can be used as the heap. The array is |
| 166 | + * terminated by a HeapRegions_t structure that has a size of 0. The region |
| 167 | + * with the lowest start address must appear first in the array. |
| 168 | + */ |
169 | 169 | void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;
|
170 | 170 |
|
171 |
| - /* |
172 |
| - * Returns a HeapStats_t structure filled with information about the current |
173 |
| - * heap state. |
174 |
| - */ |
| 171 | +/* |
| 172 | + * Returns a HeapStats_t structure filled with information about the current |
| 173 | + * heap state. |
| 174 | + */ |
175 | 175 | void vPortGetHeapStats( HeapStats_t * pxHeapStats );
|
176 | 176 |
|
177 |
| - /* |
178 |
| - * Map to the memory management routines required for the port. |
179 |
| - */ |
| 177 | +/* |
| 178 | + * Map to the memory management routines required for the port. |
| 179 | + */ |
180 | 180 | void * pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
|
181 | 181 | void * pvPortCalloc( size_t xNum,
|
182 |
| - size_t xSize ) PRIVILEGED_FUNCTION; |
| 182 | + size_t xSize ) PRIVILEGED_FUNCTION; |
183 | 183 | void vPortFree( void * pv ) PRIVILEGED_FUNCTION;
|
184 | 184 | void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
|
185 | 185 | size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
|
|
194 | 194 | #endif
|
195 | 195 |
|
196 | 196 | #if ( configUSE_MALLOC_FAILED_HOOK == 1 )
|
197 |
| - /** |
198 |
| - * task.h |
199 |
| - * @code{c} |
200 |
| - * void vApplicationMallocFailedHook( void ) |
201 |
| - * @endcode |
202 |
| - * |
203 |
| - * This hook function is called when allocation failed. |
204 |
| - */ |
205 |
| - void vApplicationMallocFailedHook( void ); /*lint !e526 Symbol not defined as it is an application callback. */ |
| 197 | + |
| 198 | +/** |
| 199 | + * task.h |
| 200 | + * @code{c} |
| 201 | + * void vApplicationMallocFailedHook( void ) |
| 202 | + * @endcode |
| 203 | + * |
| 204 | + * This hook function is called when allocation failed. |
| 205 | + */ |
| 206 | + void vApplicationMallocFailedHook( void ); /*lint !e526 Symbol not defined as it is an application callback. */ |
206 | 207 | #endif /* ( configUSE_MALLOC_FAILED_HOOK == 1 ) */
|
207 | 208 |
|
208 | 209 | #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
|
|
0 commit comments