Hm, are you sure that this is currently the case? FreeRTOS kernel should call vApplicationMallocFailedHook when a malloc has failed from within the kernel but does any of the PiOS code call vApplicationMallocFailedHook?