Hey everyone, hopefully this is the right area to post. I was poking around in my /proc directory tonight, and began thinking. (Usually this leads to massive amounts of questions). When a program is executed, how does the OS know how much total memory to give to the program? And is the the total memory even divided 50/50 for it's heap and stack? What determines rather the application have more stack memory or more heap memory?
I'm sure this is answered somewhere, but I can't get a clear answer, thanks in advance!