From owner-freebsd-chat Thu Apr 15 13:13:59 1999 Delivered-To: freebsd-chat@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id AF767158A5 for ; Thu, 15 Apr 1999 13:13:45 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id FAA08433; Fri, 16 Apr 1999 05:11:04 +0900 (JST) Message-ID: <3716476E.80DF2DBC@newsguy.com> Date: Fri, 16 Apr 1999 05:09:18 +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: chuckr@picnic.mat.net, chat@FreeBSD.ORG Subject: Re: swap-related problems References: <14102.8184.91918.375800@avalon.east> <14102.16644.178732.291963@avalon.east> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Anthony Kimball wrote: > > I'm glad to be corrected where I err. But we are ANSI incompatible > if one cannot configure the system so that malloc failure semantics > conform to the C spec. Being able to rely upon ANSI C malloc failure > semantics is a contributory factor in being able to run a correctly > written application reliably. It is not sufficient, however, as > others have noted. In order to respond properly to the practical > inadequacy of mere ANSI conformance, the scope of the discussion has > expanded. Ok, here is the error of your ways. You are assuming that malloc(3) will return memory when there is none. This is incorrect. What happens is that processes get killed when the system find itself needing more memory than it has available. There are two ways of preventing that. One is pre-allocate all memory. This is not useful, because the memory available to each process ends up being very small. As an experiment, run X Free with the pre-zero pages flag set. The second way is to set limits to the memory the processes can use, without actually giving up on-demand allocation. FreeBSD supports this. Man login.conf(5). -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org "Well, Windows works, using a loose definition of 'works'..." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message