From owner-freebsd-current Wed Apr 14 7:41:35 1999 Delivered-To: freebsd-current@freebsd.org Received: from phk.freebsd.dk (phk.freebsd.dk [212.242.40.153]) by hub.freebsd.org (Postfix) with ESMTP id 66B541577D for ; Wed, 14 Apr 1999 07:41:31 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by phk.freebsd.dk (8.9.1/8.8.8) with ESMTP id QAA29212; Wed, 14 Apr 1999 16:39:10 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.2/8.9.2) with ESMTP id QAA00637; Wed, 14 Apr 1999 16:39:09 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Mikhail Teterin Cc: current@FreeBSD.ORG Subject: Re: swap-related problems In-reply-to: Your message of "Wed, 14 Apr 1999 09:14:35 EDT." <199904141314.JAA24946@kot.ne.mediaone.net> Date: Wed, 14 Apr 1999 16:39:09 +0200 Message-ID: <635.924100749@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199904141314.JAA24946@kot.ne.mediaone.net>, Mikhail Teterin writes: >Poul-Henning Kamp once stated: > >=>Well, this is just an implementation detail, is not it? I don't >=>mean to critisize, or anything, but such thing as "no available >=>memory" is a fairly intuitive... Coming down, again, the malloc >=>should return a usable memory if available and NULL if it's not. >=>Is not this a "natural" semantics? Why can a program die because >=>_another_ program ate up all the rest of the memory? >= >=You know, this strikes me about as productive a discussion as the >[...] >=Very very fundamental to UNIX philosophy is the maxim that it is >=roots responsibility to configure the system right. > >I'm sorry I managed to annoy you. However, a program needs to be >able to know if it can legally ask for more memory, right? And it >is "very fundamental to malloc philosophy", that malloc returns >NULL, when it can not get more memory. Which it apparently does >now on FreeBSD, but only if the program exceeds an artificial >datasize limit... malloc() on FreeBSD returns NULL when it cannot allocate the memory asked for. If you have an example where this is not the case I would VERY much like to see it. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message