Design Element
Comment on "Intro to Memory and Arrays in C"
by Scott Stevenson — Feb 21
The heap is just stuff instantiated with new, right?

You're at least part right, and you've exposed a mistake in the tutorial. The heap is where malloc gets its memory, but global variables are actually stored in the data segment. I believe the 'new' bit you refer to is specific to C++ objects.
Back to "Intro to Memory and Arrays in C"
Design Element

Copyright © Scott Stevenson 2004-2015