From owner-freebsd-hackers@FreeBSD.ORG Thu May 21 08:12:51 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C051065670 for ; Thu, 21 May 2009 08:12:51 +0000 (UTC) (envelope-from elias@artx.ru) Received: from round.artx.ru (round.artx.ru [80.73.175.73]) by mx1.freebsd.org (Postfix) with ESMTP id C4F188FC18 for ; Thu, 21 May 2009 08:12:50 +0000 (UTC) (envelope-from elias@artx.ru) Received: by round.artx.ru (Postfix, from userid 1001) id C183C5C29; Thu, 21 May 2009 11:39:18 +0400 (MSD) Date: Thu, 21 May 2009 11:39:18 +0400 From: Ilya Orehov To: Yuri Message-ID: <20090521073918.GA54618@artx.ru> Mail-Followup-To: Ilya Orehov , Yuri , freebsd-hackers@freebsd.org References: <4A14F58F.8000801@rawbw.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4A14F58F.8000801@rawbw.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Why kernel kills processes that run out of memory instead of just failing memory allocation system calls? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 08:12:51 -0000 +------- Yuri, 2009-05-20 ------- | Seems like failing system calls (mmap and sbrk) that allocate memory is more | graceful and would allow the program to at least issue the reasonable | error message. | And more intelligent programs would be able to reduce used memory | instead of just dying. Hi! You can set memory limit to achieve your goal: tcsh% limit vmemoryuse 20M In this case, malloc(1000000000) will return 0. Ilya. | | Yuri | | _______________________________________________ | freebsd-hackers@freebsd.org mailing list | http://lists.freebsd.org/mailman/listinfo/freebsd-hackers | To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" | +-----------------------------