Date: Thu, 15 Apr 1999 08:37:20 +1000 From: "Andrew Reilly" <andrew@lake.com.au> To: alk@pobox.com, dcs@newsguy.com Cc: current@FreeBSD.ORG Subject: Re: swap-related problems Message-ID: <19990415083720.A1870@reilly.home> In-Reply-To: <14100.61923.427423.153188@avalon.east>; from Anthony Kimball on Wed, Apr 14, 1999 at 02:55:27PM -0500 References: <14100.61923.427423.153188@avalon.east>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 14, 1999 at 02:55:27PM -0500, Anthony Kimball wrote: > > : > All I want is that a program gets NULL from malloc if there is no memory > : > available. I find that to be a very fundamental thing about malloc. > > : Do you have a solution? We don't. > > Make an sbrk variant which will pre-allocate backing store. > setenv MALLOC_PREALLOCATE > > Not so hard. You could do this yourself, I think, by: 1) create your own backing file of the appropriate size 2) mmap it into your address space 3) tell your own malloc() routine that that's where it should get memory from. Any problems with that? (besides not being the system standard, and the reduction of swapping efficiency caused by going through the file system). -- Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990415083720.A1870>