mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-06-20 01:53:42 +02:00
When configENABLE_HEAP_PROTECTOR is 1 and a pvPortMalloc() request cannot be satisfied by any free block, the free list search advances onto the end marker (pxEnd) and validates it with heapVALIDATE_BLOCK_POINTER(). pxEnd is located at pucHeapHighAddress and is not part of the usable heap, so the macro's "( pxBlock ) < pucHeapHighAddress" bounds check fails and the configASSERT() fires on what is a normal out-of-memory condition. The code should instead fall through and call the malloc failed hook. Exclude the end marker from validation in the search loop so an allocation that cannot be satisfied returns NULL (and invokes vApplicationMallocFailedHook when configUSE_MALLOC_FAILED_HOOK is 1) without asserting.
Each real time kernel port consists of three files that contain the core kernel components and are common to every port, and one or more files that are specific to a particular microcontroller and/or compiler. + The FreeRTOS/Source/Portable/MemMang directory contains the five sample memory allocators as described on the https://www.FreeRTOS.org WEB site. + The other directories each contain files specific to a particular microcontroller or compiler, where the directory name denotes the compiler specific files the directory contains. For example, if you are interested in the [compiler] port for the [architecture] microcontroller, then the port specific files are contained in FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the only port you are interested in then all the other directories can be ignored.