From owner-freebsd-current Wed Apr 14 22: 6:42 1999 Delivered-To: freebsd-current@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id BE4C114BE2 for ; Wed, 14 Apr 1999 22:06:40 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id OAA08808; Thu, 15 Apr 1999 14:04:13 +0900 (JST) Message-ID: <371572E4.D9C64C93@newsguy.com> Date: Thu, 15 Apr 1999 14:02:28 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.51 [en] (Win98; I) X-Accept-Language: pt-BR,ja MIME-Version: 1.0 To: alk@pobox.com Cc: current@freebsd.org Subject: Re: swap-related problems References: <14100.61923.427423.153188@avalon.east> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 As soon as this application grabs all the memory, the next thing to request more memory (not a malloc!) will cause the application to be killed (largest application criteria). Change the criteria, and *another* application gets killed. Any application getting killed is a problem, you'll find very fast. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "nothing better than the ability to perform cunning linguistics" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message