Re: strange stack limit behavior when allocating more than 2GB mem on 32bit machine

Michał Nazarewicz <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
On Fri, 21 Aug 2009 13:04:11 +0200, Joe <[email protected]> wrote:

> Clear. But how comes 2000MB can be allocated when stack limit is unlimited?
>
> $ ulimit -s
> unlimited
> $ ./malloc 2046
> Malloc succeeded
> $ ./malloc 2047
> malloc failed: Cannot allocate memory           <==== the critical
> point for my case is 2046MB

Because, there is a large enough continuous area in address space.
I'm not sure how to answer that differently.

PS. Again, do not top post and remove unnecessary comments and signatures.

-- 
Best regards,                                            _     _
  .o. | Liege of Serenly Enlightened Majesty of         o' \,=./ `o
  ..o | Computer Science,  Micha³ "mina86" Nazarewicz      (o o)
  ooo +----<[email protected]>---<[email protected]>-ooO----(_)--Ooo--

--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.