malloc in an embedded system without an operating system
This query is regarding allocation of memory using malloc . Generally what we say is malloc allocates memory from heap. Now say I have a plain embedded system(No operating system), I have normal program loaded where I do malloc in my program. In this case where is the memory allocated from ? malloc() is a function that is usually implemented by the runtime-library. You are right, if you are running on top of an operating system, then malloc will sometimes (but not every time) trigger a system-call that makes the OS map some memory into your program's address space. If your program runs without