Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 1998 11:23:34 -0400
From:      Aaron Jeremias Luz <aaron@csh.rit.edu>
To:        phj <phj@www.transfar.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: How to malloc more memory than 20M.
Message-ID:  <19980628112334.31048@homenet>
In-Reply-To: <3596E355.942F1AF9@www.transfar.com>; from phj on Sun, Jun 28, 1998 at 05:44:05PM -0700
References:  <3596E355.942F1AF9@www.transfar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 28, 1998 at 05:44:05PM -0700, phj wrote:
> Do you know how to malloc more space for my program.
>     char *p;
>     p=(char *)malloc(20000000);
>  it always fail at the above line ,how can I malloc more memory than
> 20M.

You are probably running into user resource limits.  These
can be changed by editing /etc/login.conf.  (Don't forget to 
run cap_mkdb /etc/login.conf afterwards!)  Or you could 
change which class your login account is assigned to using
chfn as root.

Aaron

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980628112334.31048>