Subject: Re: process can't malloc more than 16M...what am I missing here?
To: None <mbradfor@milliways.uark.edu>
From: Chet Ramey <chet@odin.INS.CWRU.Edu>
List: netbsd-help
Date: 04/12/1996 14:23:02
> The problem is that there seems to be a malloc ceiling of 16M, after which
> named complains that it can't malloc any more memory and crashes.

(I don't currently run any NetBSD machines; this is sort of the
generic 4.4 BSD explanation.  If I get some of the NetBSD details
wrong, someone will surely correct me.)

Look at the default resource limits, especially those for the default
and max data sizes.  The default data size limit is usually 16M; the
maximum is usually 64M.

You can see what the resource limits are or change them using the
sh `ulimit' or csh `limit' builtins.

You can put a wrapper script around a particular program, e.g. named,
to raise its default resource limits:

#! /bin/sh -
ulimit -d 33554432	# 32 MB
exec /usr/sbin/named "$@"

> So then we added another 16M (we needed this anyway), but still processes
> are unable to acquire more than 16M of memory. I was unable to find any
> kernel options relating to this, or any other explanation for the problem.

You can try adding something like the following to your kernel
configuration file:

options         DFLDSIZ="'(64*1024*1024)'"
options         MAXDSIZ="'(256*1024*1024)'"

This raises the default data size limit to 64 MB and the maximum data
size to 256 MB.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, Case Western Reserve University	Internet: chet@po.CWRU.Edu