Re: A quit strange coredump
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Mon, 12 Jun 2006 07:57:19 +0000 (UTC)
In article <1150097242.494159.5790@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
tomy <tomyling@xxxxxxxxx> wrote:
But I still hold a question: What the exactly amount of stack memory
the process can take. On the 32bit machine, the stack's virtual memory
is like 0x4000000 ~ 0xc000000, that's 800M.isn't it?
Depends on the operating system. On the 32 bit machine I'm using
now, I could probably push the stack up to 1.2 Gb, possibly even more.
My computer has
500M(add 1G swap memory)physically, however I could only allocate about
110M in the stack. that's funny?
Operating system dependant. Stacks are sometimes placed below shared
libraries, with the heap being above the shared libraries; on such
systems, the available room for the stack or heap would depend on
the shared library sizes and positions. And of course not all systems
use stacks or heaps.
And How could i find the fresh memory
to use, without maintain the total amount?
If you want to know how much more memory you could allocate, then the
only portable way is to keep allocating memory until you run out.
Unfortunately doing that might have adverse effects on your program or
other things happening on your system, so that's not a very good
method.
Questions about available memory to allocate are often fairly
complex to answer; you really need someone who specializes in
your platform (i.e., in a different newsgroup.)
--
All is vanity. -- Ecclesiastes
.
- References:
- A quit strange coredump
- From: tomy
- Re: A quit strange coredump
- From: Ben C
- Re: A quit strange coredump
- From: Keith Thompson
- Re: A quit strange coredump
- From: tomy
- A quit strange coredump
- Prev by Date: Re: Need some help compiling something
- Next by Date: gcc knows about malloc()
- Previous by thread: Re: A quit strange coredump
- Next by thread: Re: A quit strange coredump
- Index(es):
Relevant Pages
|