lkml.org 
[lkml]   [2001]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: memory allocation problems
In mailing-lists.linux-kernel, you wrote:

> Essentially, the problem can be summarized to be that on a machine
> with ample ram (2G, 4G, etc), I am unable to malloc a gig if I ask
> for the memory in small ( <= 128k) chunks.

Take a look at this message by Szabolcs Szakacsits:

http://marc.theaimsgroup.com/?l=linux-kernel&m=97898653909227&w=2

There are other messages that may be of interest to you in that
thread, although they are spread out in a large thread.

Briefly, malloc in glibc will use brk() for "small" chunks and mmap()
for "large" chunks. On a usual i386 linux kernel, the 4GB address
space is set up so that brk() can get at most 870MB or so and mmap()
can get at most 2GB. Newer glibc's allow you to tune the definition
of "small" via an environment variable.

Cheers,
Wayne
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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