By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,943 Members | 1,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,943 IT Pros & Developers. It's quick & easy.

Stack memory

P: n/a
I have doubts about validity of question below...but still due to my
curiosity i am asking.........
-----
We have 3 main portion in our memory analysis
*code segment
*heap
*stack

We can easily know memory available for heap by regular call for
malloc....which in my environment comes as 61KB

Now my question is can we also know maximum amount of stack memory
available in our environment.....
or there is some sharing of memory b/w heap and stack...?
Nov 16 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
c.***********@gmail.com wrote:
I have doubts about validity of question below...but still due to my
curiosity i am asking.........
-----
We have 3 main portion in our memory analysis
*code segment
*heap
*stack

We can easily know memory available for heap by regular call for
malloc....which in my environment comes as 61KB
That small?
Now my question is can we also know maximum amount of stack memory
available in our environment.....
or there is some sharing of memory b/w heap and stack...?
These questions are very system specific, how memory is partitioned and
size limits will be specified by your implementation's documentation.

--
Ian Collins
Nov 16 '08 #2

P: n/a
On Nov 16, 10:24*am, Ian Collins <ian-n...@hotmail.comwrote:
c.lang.mys...@gmail.com wrote:
I have doubts about validity of question below...but still due to my
curiosity i am asking.........
-----
We have 3 main portion in our memory analysis
*code segment
*heap
*stack
We can easily know memory available for heap by regular call for
malloc....which in my environment comes as 61KB

That small?
I am using borland Turbo C environment..
>
Now my question is can we also know maximum amount of stack memory
available in our environment.....
or there is some sharing of memory b/w heap and stack...?

These questions are very system specific, how memory is partitioned and
size limits will be specified by your implementation's documentation.

--
Ian Collins
Can we know what is maximum amount of stack available in our
system.....
Nov 16 '08 #3

P: n/a
On Sun, 16 Nov 2008 04:01:24 -0800 (PST), "c.***********@gmail.com"
<c.***********@gmail.comwrote:
>On Nov 16, 10:24*am, Ian Collins <ian-n...@hotmail.comwrote:
>c.lang.mys...@gmail.com wrote:
I have doubts about validity of question below...but still due to my
curiosity i am asking.........
-----
We have 3 main portion in our memory analysis
*code segment
*heap
*stack
We can easily know memory available for heap by regular call for
malloc....which in my environment comes as 61KB

That small?
I am using borland Turbo C environment..
>>
Now my question is can we also know maximum amount of stack memory
available in our environment.....
or there is some sharing of memory b/w heap and stack...?

These questions are very system specific, how memory is partitioned and
size limits will be specified by your implementation's documentation.

--
Ian Collins

Can we know what is maximum amount of stack available in our
system.....
There is no portable way. If you ask in a newsgroup that discusses
your system, you may find a system specific method.

--
Remove del for email
Nov 16 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.