From: Nicholas Mc Guire <mcguire@lzu.edu.cn>
To: Joe <longapple@gmail.com>
Cc: Glynn Clements <glynn@gclements.plus.com>,
linux-c-programming@vger.kernel.org
Subject: Re: strange stack limit behavior when allocating more than 2GB mem on 32bit machine
Date: Fri, 21 Aug 2009 11:37:50 +0200 [thread overview]
Message-ID: <20090821093750.GA16299@opentech.at> (raw)
In-Reply-To: <56b13acf0908210212t5b6921f5h4c224efa21d2f067@mail.gmail.com>
On Fri, 21 Aug 2009, Joe wrote:
> Hi Glynn,
>
> Thanks for your explanation. However as you can see, I got 2GB mem and
> ~10GB swap, totally 12GB.
>
> With ulimit -s 10240(KB), I can allocate 2.5GB, I guess these are in
> swap, right?
> With ulimit -s unlimited, as you said, kernel reserved 1GB, stack
> reserved 2GB, there are still 12-3=9GB left??
>
> Why did malloc failed, instead of allocating this abundant swap space?
>
initializing 12GB swap will not change the address space limit unless you
enabled high-memory support in the kernel (CONFIG_HIGHMEM64G=y in your .config)
the limit is not the physical memory (RAM+swap) but the 32bit address space.
hofrat
next prev parent reply other threads:[~2009-08-21 9:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 3:47 strange stack limit behavior when allocating more than 2GB mem on 32bit machine Joe
2009-08-21 6:58 ` Glynn Clements
2009-08-21 9:12 ` Joe
2009-08-21 9:37 ` Nicholas Mc Guire [this message]
2009-08-21 10:33 ` Michał Nazarewicz
2009-08-21 9:38 ` Michał Nazarewicz
2009-08-21 11:04 ` Joe
2009-08-21 12:21 ` Michał Nazarewicz
2009-08-22 7:44 ` Glynn Clements
2009-08-21 7:09 ` Michał Nazarewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090821093750.GA16299@opentech.at \
--to=mcguire@lzu.edu.cn \
--cc=glynn@gclements.plus.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=longapple@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).