Results 1 to 2 of 2
hii group..
i m having a query abt how the stack space(more precisely whole segment space for the program) is decided...
V know that For a particualr programm v have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-08-2004 #1Just Joined!
- Join Date
- Oct 2004
- Posts
- 5
STACK SPACE DECISION
hii group..
i m having a query abt how the stack space(more precisely whole segment space for the program) is decided...
V know that For a particualr programm v have 4 different or segments in memory...
1)Code segment
2)Data segment
3)Heap segment
4)Stack segment..
Now when v talk abt virtual memeory scenario its also known that 3 GB of memory is allocated by OS for these sections in all...
Starting or 0th byte given to the code segment n then proceeding upwards ..also the stack grows downwards frm the location 3rd GBth location.This whole is decided by OS...,ie.,Os decides the size of the complete memory allocated to these segments in all...
My questions r->
1).According to linux implementation v had 4 GB of Virtual Memory so "y it starts the stack with 3GB memory" ,ie,....Y it alloactes 3GB memory all these segments in all....Y cant 4GB full is allocated...
2)Also if i assume that i had no underlying OS n still i had to prform the task of alloacting space to all these segments then how i decide how much space is allocated to them in all..
3)Also How Stack ptr will b initialised?
4) In normal scenario how this stack ptr gets initialised...
- 10-08-2004 #2
Please do not triple post


Reply With Quote
