It is ok to use some API without a task and scheduler?

I want to use some functions provided by freeRTOS, such as heap management or so. but not the task and scheduler.
Therefore is it Okay to use malloc mapped to vportmalloc directly?

The heap allocators maintain mutual exclusion by locking the locking the scheduler. If you are not using multithreading then this won’t make any difference to anything because nothing else will be accessing the heap structures at the same time. If you are using multithreading through any mechanism other than FreeRTOS it could be an issue if two tasks access the heap simultaneously.

Separately, the scheduler locking uses a critical section. Critical sections that execute before the scheduler starts could leave some interrupts masks, depending on the port you are using. If you say which port you are using I can tell you if this will be true in your case, and if so, how to get around it.

cool, thx. I will check out the source code to see what actually I can use and how to use.