You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* Heap improvements This commit makes the following improvements: 1. Add a check to heap_2 to track if a memory block is allocated to the application or not. The MSB of the size field is used for this purpose. The same check already exists in heap_4 and heap_5. This check prevents against double free. 2. Add a new flag configHEAP_CLEAR_MEMORY_ON_FREE to heap_2, heap_4 and heap_5. The application writer can set it to 1 in their FreeRTOSConfig.h to ensure that a block of memory allocated using pvPortMalloc is cleared (i.e. set to zero) when it is freed using vPortFree. If left undefined, configHEAP_CLEAR_MEMORY_ON_FREE defaults to 0 for backward compatibility. We recommend setting configHEAP_CLEAR_MEMORY_ON_FREE to 1 for better security. 3. Add a new API pvPortCalloc to heap_2, heap_4 and heap_5. This API has the following signature: void * pvPortCalloc( size_t xNum, size_t xSize ); It allocates memory for an array of xNum objects each of which is of xSize and initializes all bytes in the allocated storage to zero. If allocation succeeds, it returns a pointer to the lowest byte in the allocated memory block. On failure, it returns a null pointer. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> |
3 years ago | |
---|---|---|
.. | ||
FreeRTOS.h | 3 years ago | |
StackMacros.h | 3 years ago | |
atomic.h | 4 years ago | |
croutine.h | 3 years ago | |
deprecated_definitions.h | 4 years ago | |
event_groups.h | 3 years ago | |
list.h | 3 years ago | |
message_buffer.h | 3 years ago | |
mpu_prototypes.h | 4 years ago | |
mpu_wrappers.h | 3 years ago | |
portable.h | 3 years ago | |
projdefs.h | 4 years ago | |
queue.h | 3 years ago | |
semphr.h | 3 years ago | |
stack_macros.h | 4 years ago | |
stdint.readme | 4 years ago | |
stream_buffer.h | 3 years ago | |
task.h | 3 years ago | |
timers.h | 3 years ago |