Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!uunet!in1.uu.net!206.229.87.25!news.sprintlink.net!news-peer.sprintlink.net!howland.erols.net!worldnet.att.net!news.dra.com!news.starnet.net!news.starnet.net!news.utdallas.edu!nrchh45.rich.nt.com!bcarh189.bnr.ca!bmerhc5e.bnr.ca!bcarh8ab.bnr.ca!bcrkh13.bnr.ca!kaz From: kaz@vision.crest.nt.com (Kaz Kylheku) Newsgroups: comp.unix.bsd.freebsd.misc,comp.lang.c,comp.sys.sun.apps Subject: Re: Alternative malloc ? Date: 17 Jan 1997 16:24:25 GMT Organization: Prism Systems Inc. Lines: 11 Message-ID: <5bo93p$pn1@bcrkh13.bnr.ca> References: <5bjh02$j64@chronicle.concentric.net> NNTP-Posting-Host: 47.63.64.170 Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:34155 comp.lang.c:185836 comp.sys.sun.apps:14738 In article <5bjh02$j64@chronicle.concentric.net>, Daniel Ts'o <dantso@cris.com> wrote: > I am running a big program on FreeBSD 2.1. It is 66Mb and wants to >grow a bit and malloc is failing. I presume that it is because, as I recall, >the behavior of the BSD default malloc is to allocate in powers of two and the >next step would be 130Mb, which is bigger than free swap at the moment. You are probably running into a process limit. Most UNIXes don't care about where your malloc function sets the break limit: the allocated memory is marked as ``create on write'': when you access it, a page fault occurs which causes a new page to be mapped to that location.