unsigned ctl_heap_can_alloc(CTL_HEAP_t *heap,
                            size_t byteSize,
                            unsigned nBlocks);

ctl_heap_can_alloc tests to see in nBlocks of size byteSize can be allocated in the heap self. Note that success is not an indication that a subsequent allocation will also succeed as other tasks may allocation memory from the heap. In this case, lock the heap mutex, run the test, and if successful, allocate the memory, and finally free the mutex.