Link to home
Start Free TrialLog in
Avatar of dhavalshah
dhavalshah

asked on

"Dynamic Memory Allocation by 'C' for a target (That does not have any Operating System on it)

In 'C', for dynamic allocation, the Borland Compiler allocates memory on the Heap. I want to know, if i am developing  firmware for a target (AM186ER), which does not have any operating system on it, can i use dynamic allocation for that? If, yes then how heap memory allocation is to be taken care into the Firmware?
Avatar of Narendra Kumar S S
Narendra Kumar S S
Flag of India image

Usually in firmwares dynamic memory allocation is not encouraged.
If you still want to do it, then you will have to know the memory layout of your firmware.
Also, you should understand how the processor works and manages memory.

-ssnkumar
ASKER CERTIFIED SOLUTION
Avatar of brettmjohnson
brettmjohnson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of novitiate
novitiate

Does it has any memory manager? since you said it has no OS I presume you don't. In such a case there is no point in dynamic memory allocation, since you would need some thing to manage the memory (memory manager). check what your firmware support.

for more information visit:
http://www.mactech.com/articles/develop/issue_02/Mem_Mgr_v006.html

(novi)