Friday, 30 August 2013

what is range of addres on stack and memory

what is range of addres on stack and memory

On computer memory, say IA32, what is the range of stack in general? I
know address like 0xffff1234, is probably on the stack. Is it possible for
stack to grow to 0x0800abcd for example? How about heap? I know heap
address is always lower than stack address but what is normally its range?
Also what is the area below heap?
The stack - The memory the program uses to actually run the program. This
contains local variables, call-back data (for example when you call a
function, the stack stores the state and place you were in the code before
you entered the new function), and some other little things of that
nature. You usually don't control the stack directly, the variables and
data are destroyed, created when you move in and out function scopes.
The heap - The "dynamic" memory of the program. Each time you create a new
object or variable dynamically, it is stored on the heap. This memory is
controlled by the programmer directly, you are supposed to take care of
the creation AND deletion of the objects there.
Thanks a lot!!!!!!!!!!!!!!!

No comments:

Post a Comment