Re:What every programmer should know about memory (2007)
by aidenn0 on Friday November 20, 2015 @12:10PM
(#10602317)
You do know that function stack frames are dynamically allocated (just not from the heap in most C and C++ implementations).
[ Parent
| on HN ]
Re:What every programmer should know about memory (2007)
by jheriko on Monday November 30, 2015 @02:56PM
(#10651346)
in a sense yes, but its not a realistic way to use the term.
what happens is that the stack is once dynamically allocated up-front when the thread is created and an index into that blob of memory is incremented and decremented as appropriate (stack pointer).
you can call that allocation, and it would be accurate but its not what i meant at all. it also avoids growing your memory consumption and doesn't impact memory budgets no matter how much stack you try and use (you will overflow it instead... and will need to allocate a bigger budget upfront for the stack with a compiler flag)
Re:What every programmer should know about memory (2007)
by Namrog84 on Friday November 20, 2015 @01:39PM
(#10602947)
Maybe he is coming from the fact that lots of things still leak memory this day and age. And you tend to not leak memory when you avoid dynamic allocation?
Though you can still build up crud depending upon the system.