Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help required for an Embedded Interview question!!

Status
Not open for further replies.

srinivasansreedharan

Junior Member level 3
Junior Member level 3
Joined
Feb 24, 2010
Messages
27
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,283
Location
USA
Activity points
1,451
If a C program contains no recursion or reentrancy, the call stack is not actually needed.In other words, stack-allocated variables can be turned into global variables (by the compiler) when there is no possibility that more than one instance of a function may be running at a time. Even though turning stack variables into globals would increase the speed of code (the overhead of manipulating the stack would disappear), and it would eliminate the possibility of stack over ow, all embedded compilers generate code that uses a stack. Explain why. In other words, what speci c bene ts are gained through stack-based memory allocation?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top