Could it be more efficient for systems in general to do away with Stacks and just use Heap for memory management?

Posted by Dark Templar on Programmers See other posts from Programmers or by Dark Templar
Published on 2011-10-08T21:02:40Z Indexed on 2012/10/27 23:19 UTC
Read the original article Hit count: 186

Filed under:

It seems to me that everything that can be done with a stack can be done with the heap, but not everything that can be done with the heap can be done with the stack. Is that correct? Then for simplicity's sake, and even if we do lose a little amount of performance with certain workloads, couldn't it be better to just go with one standard (ie, the heap)?

Think of the trade-off between modularity and performance. I know that isn't the best way to describe this scenario, but in general it seems that simplicity of understanding and design could be a better option even if there is a potential for better performance.

© Programmers or respective owner

Related posts about memory