Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
i m having a query abt how the stack size is decided...
V know that For a particualr programm v have 4 different or segments in memory...
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...