From owner-freebsd-current Wed Apr 14 10:14:25 1999 Delivered-To: freebsd-current@freebsd.org Received: from misha.cisco.com (misha.cisco.com [171.69.206.50]) by hub.freebsd.org (Postfix) with ESMTP id 17C5E157EC for ; Wed, 14 Apr 1999 10:14:22 -0700 (PDT) (envelope-from mi@misha.cisco.com) Received: (from mi@localhost) by misha.cisco.com (8.9.2/8.9.1) id NAA95762 for current@freebsd.org; Wed, 14 Apr 1999 13:12:00 -0400 (EDT) (envelope-from mi) From: Mikhail Teterin Message-Id: <199904141712.NAA95762@misha.cisco.com> Subject: Re: swap-related problems In-Reply-To: <55586E7391ACD211B9730000C11002761795EB@r-lmh-wi-100.corpnet.at> from Ladavac Marino at "Apr 14, 1999 06:20:03 pm" To: current@freebsd.org Date: Wed, 14 Apr 1999 13:12:00 -0400 (EDT) Reply-To: mi@aldan.algebra.com X-Mailer: ELM [version 2.4ME+ PL52 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ladavac Marino once wrote: > [ML] Sadly, in the memory overcommit situation, there is no way to > know whether a pointer returned by malloc will cause a process demise > or not. The pointer is valid, but the swap area mapping is defered > until the page is dirtied (basically, the pointer points to a readonly > zero filled physical page and on write the trap handler tries to > allocate a backing swap area for the page. If the swap is exhausted, > the handler eventually fails. What the system does at this time is > irrelevant. [...] > Please note that memory overcommit architectures are a rather common > optimization; FreeBSD is one of them. They do, however, break the > ISO/ANSI C conformance (strictly speaking). Aha, now its clearer. May be, since we are do not conform anyway, we can design some clever way of notifying a program rather then SIGKILL-ing it? Perhaps, SIGBUS? Something, a program can catch, if it is prepared to, and, may be, do some syscall to find out which chunk of memory can not actually be used by it... -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message