Subject: Re: 127MB limits NetBSD memory allocation?
To: Ezequiel Reyes <ezequiel.reyes@newhotel.co.cu>
From: Courtney R. Spencer <cspencer@mindspring.com>
List: netbsd-users
Date: 07/12/2005 18:18:40
On Wed Jul 13, 2005 at 12:06:42AM +0200, Florian Stoehr wrote:
> On Tue, 12 Jul 2005, Ezequiel Reyes wrote:
> 
> >Hi, I've been trying to compile a program for NetBSD that uses mmap() to 
> >map
> >128MB to memory. But the function gives me a not enogh memory error (can't
> >remember the man constant right now), I then tried 127 and it work ok. I
> >then used malloc() to try getting 128, but it can't allocate as much 
> >either,
> >only 127 again. Is this a limitation of NetBSD? I can allocate 128 on other
> >platforms with no problem using either mmap or malloc.
> >
> 
> It's "ulimit -d unlimited" for bash.
> 
> root only may do this, unless you export a higher limit than the
> default one.
> 
> You may also search the mailing list archives for further information, 
> often people have data size limit problems with Java under NetBSD.
> 

To add one more reference to what everyone else has concluded, you
may set datasize for a class of users in login.conf(5). The method 
you choose depends on wheter you want to update kernel config to
increase the real limit, or source shell files or set login definitions
for the user limits.

-- 
Courtney R. Spencer