I would keep FreeRTOS completely out of this. FreeRTOS itself has absolutely nothing to do with the heap implementation but it relies on pvPortMalloc to be available at link time and allocating memory. A common way is to redefine pvPortMalloc using the preprocessor in FreeRTOSConfig.h