Subject: Re: 127MB limits NetBSD memory allocation?
To: None <netbsd-users@netbsd.org>
From: Martijn van Buul <martijnb@atlas.ipv6.stack.nl>
List: netbsd-users
Date: 07/12/2005 20:29:53
It occurred to me that Ezequiel Reyes wrote in gmane.os.netbsd.general:
> 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.
By default, user processes under NetBSD are limited to a 128 MB data segment
size. Try 'ulimit datasize' (Assuming a csh-ish shell here, I don't know
what bash thinks of this), or try running things as root.
See man 2 getrlimit for details.