[lkml]   [2003]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: malloc problem to allocate very large blocks
On Maw, 2003-07-29 at 05:58, Nagendra Singh Tomar wrote:
> AFAIK malloc will not return you memory more than the total virtual memory
> (RAM+swap) in the system. So if you want more than 2GB allocations from
> malloc, make sure you have at least 2GB virtual mem, keeping aside some
> space for the kernel.

On the default memory settings it may do. However a request for 2Gb of
memory requires there is a free 2Gb of address space to map it into -
which may not be true because of things like shared libraries.

The actual total allocatable limit for x86 is a bit under 3Gb, but you
won't get that as one linear allocation. (1Gb is kernel mappings)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.064 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site