*BSD News Article 69775


Return to BSD News archive

#! rnews 2299 bsd
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!ns.saard.net!spasun.tpa.com.au!news.adelaide.on.net!news.ade.connect.com.au!news.mel.connect.com.au!munnari.OZ.AU!news.hawaii.edu!news.uoregon.edu!news.sol.net!newspump.sol.net!news.inc.net!news.us.world.net!news.sprintlink.net!news-stk-3.sprintlink.net!newsreader.sprintlink.net!EU.net!Norway.EU.net!nntp.uio.no!nntp.uib.no!nntp-bergen.UNINETT.no!nntp-trd.UNINETT.no!newsfeed.sunet.se!news01.sunet.se!sunic!news99.sunet.se!mn5.swip.net
!news
From: Martin Nisshagen <martin@mts.se>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Malloc in FreeBSD (Was: Re: Linux vs. FreeBSD)
Date: Wed, 29 May 1996 20:14:35 +0200
Organization: MTS Technology, Sweden
Lines: 30
Message-ID: <31AC940B.236F@mts.se>
References: <3188C1E2.45AE@onramp.net> <4o3ftc$4rc@zot.io.org> <31A5A8F6.15FB7483@zeus.co.uk> <31A5D0A8.59E2B600@zeus.co.uk> <DrxB6M.Iyn@kithrup.com>
NNTP-Posting-Host: dialup119-1-12.swipnet.se
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-User: ae3c2e151a3289f0cece4e86c3df4503
X-Mailer: Mozilla 3.0b4 (WinNT; I)

Sean Eric Fagan wrote:
> 
> Historically, BSD has backed memory with swap space.  FreeBSD, however, does
> not -- it uses the same method you ascribe to Linux.  It is called "lazy
> allocation."  In fact, Net/2 used this same method -- it was a hold-over
> from the Mach VM code that Net/2 and later used.  (I believe that Lite or
> Lite2 tries to keep track of how much swap space is used, so won't allow it.
> FreeBSD, however, does allow it.)

From my perspective it sounds very dangerous to allow malloc memory
witout being able to keep that promise. Not something I consider a
good thing to have in a stable system.

> And then, when you modify a byte somewhere in the middle, either your
> program, or some other randomly-chosen process, will be killed because
> you've run out of physical and swap memory.
> 
> That is why some people do not like lazy allocation.  

Does FreeBSD use lazy allocation as default, and if so can I turn it off?

(using FreeBSD 2.1)

Best regards,

m a r t i n  n

-- 
Martin Nisshagen          martin@mts.se (MIME 1.0)    "verdi + callas = 
MTS Technology, Sweden    http://www.mts.se/martin     100% pleasure..."