1

program memory layout in linux

view story
linux-howto

http://stackoverflow.com – I am a bit confused on how a program looks like in memory , my professors told me that the stack and heap grow towards each other with the stack being at a lower memory address. First thing that bothered me with that image is that if the heap grew from high to low then if I allocated an array on the heap shouldn't a pointer to the second element be smaller in int value than a pointer to the first element ? which would be confusing I did a little research and I came upon this figure (note my question is focused on linux) ok so Data and un-initialized data come after the Text segment and a (HowTos)