From owner-freebsd-stable@FreeBSD.ORG Wed Dec 15 13:44:33 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C80CD106566B for ; Wed, 15 Dec 2010 13:44:33 +0000 (UTC) (envelope-from mamalos@eng.auth.gr) Received: from vergina.eng.auth.gr (vergina.eng.auth.gr [155.207.18.1]) by mx1.freebsd.org (Postfix) with ESMTP id 46CBC8FC08 for ; Wed, 15 Dec 2010 13:44:33 +0000 (UTC) Received: from mamalacation.ee.auth.gr (mamalacation.ee.auth.gr [155.207.33.29]) by vergina.eng.auth.gr (8.14.3/8.14.3) with ESMTP id oBFDi1IO082444; Wed, 15 Dec 2010 15:44:02 +0200 (EET) (envelope-from mamalos@eng.auth.gr) Message-ID: <4D08C61C.4090006@eng.auth.gr> Date: Wed, 15 Dec 2010 15:43:56 +0200 From: George Mamalakis User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.12) Gecko/20101103 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: =?UTF-8?B?VHJvbmQgRW5kcmVzdMO4bA==?= References: <4D08A0A1.40205@eng.auth.gr> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: stable@freebsd.org Subject: Re: vm.swap_reserved toooooo large? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 13:44:33 -0000 On 15/12/2010 13:26, Trond Endrestøl wrote: > On Wed, 15 Dec 2010 13:04+0200, George Mamalakis wrote: > >> I was testing a program that would exhaust all my memory (in C++), >> and when this would happen, it would call set_new_handler() along >> with one of my functions that would inform the user about the lack >> of memory and then it would exit the program. Instead, the program >> was force-killed by the kernel (signal 9) and I was informed that: > If all your process' memory is exhausted, then there is no memory left > for the runtime system for doing I/O and the other stuff you want. > Next, unless I'm on drugs, maybe you should call set_new_handler() > before you actually run out of memory. Just my $0.02. > > > Trond. > > > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" Trond, My problem was not that the program was force-killed, my problem was that the system reserved 500G+ of swap, even though the total size is 4G. -- George Mamalakis IT Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London) Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379