From owner-freebsd-hackers@FreeBSD.ORG Thu May 21 07:19:20 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 B1374106564A for ; Thu, 21 May 2009 07:19:20 +0000 (UTC) (envelope-from raysonlogin@gmail.com) Received: from mail-fx0-f168.google.com (mail-fx0-f168.google.com [209.85.220.168]) by mx1.freebsd.org (Postfix) with ESMTP id 4488D8FC12 for ; Thu, 21 May 2009 07:19:20 +0000 (UTC) (envelope-from raysonlogin@gmail.com) Received: by fxm12 with SMTP id 12so882215fxm.43 for ; Thu, 21 May 2009 00:19:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SA/G8otAvlAMT8KJRu8NEBeaBlJNz31l8R4D6bu7ITM=; b=XgE5KJR06wqDbd6VWCU69AEaBjzxDoEJ57PlCPUgKbSYTWAOFBBx67MSNwmXla3p/o WlmS2dmZQBG0WoS7m/qPZQFUfD9yq3HTo+8AM42/wjtnQv0zV7F9ocm5so/QGnpBtEf7 U0yFnFh10xZFoFVaLj8MncujqZjE99NuUzJAQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RdLRTM9XvMn03AfLdGxmA+B34bQAZJb6sw9Q1iIh7f9MU2G2oZBab4jt9ky9LaANI/ szrCQAC9x6uudH+cWTl30Wuwx8sS8+7lokfxlxm6X/bVNTEDktIdeapQmgC3gtRvUv9d 046Be0Myjl5PvBzlhAmQiOy0o3h7x95A58Nc4= MIME-Version: 1.0 Received: by 10.239.129.194 with SMTP id 2mr158605hbg.93.1242888999356; Wed, 20 May 2009 23:56:39 -0700 (PDT) In-Reply-To: <4A14F58F.8000801@rawbw.com> References: <4A14F58F.8000801@rawbw.com> Date: Thu, 21 May 2009 01:56:39 -0500 Message-ID: <73a01bf20905202356t5fd65eb5n7ec97f6c318e6045@mail.gmail.com> From: Rayson Ho To: yuri@rawbw.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 07:19:20 -0000 Because the kernel is lazy!! You can google for "lazy algorithm", or find an OS internals book and read about the advantages of doing it this way... Rayson On Thu, May 21, 2009 at 1:32 AM, Yuri wrote: > 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. > > 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" >