Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261971AbVA0COT (ORCPT ); Wed, 26 Jan 2005 21:14:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261954AbVAZXqG (ORCPT ); Wed, 26 Jan 2005 18:46:06 -0500 Received: from zcars04e.nortelnetworks.com ([47.129.242.56]:20423 "EHLO zcars04e.nortelnetworks.com") by vger.kernel.org with ESMTP id S261979AbVAZTJS (ORCPT ); Wed, 26 Jan 2005 14:09:18 -0500 Message-ID: <41F7EABE.2050900@nortelnetworks.com> Date: Wed, 26 Jan 2005 13:08:46 -0600 X-Sybari-Space: 00000000 00000000 00000000 00000000 From: Chris Friesen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en MIME-Version: 1.0 To: breeves@redhat.com CC: linux-os@analogic.com, Rik van Riel , Andrew Morton , linux-kernel@vger.kernel.org, James Antill Subject: Re: don't let mmap allocate down to zero References: <41F7D4B0.7070401@nortelnetworks.com> <1106762261.10384.30.camel@breeves.surrey.redhat.com> In-Reply-To: <1106762261.10384.30.camel@breeves.surrey.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 674 Lines: 18 Bryn Reeves wrote: > RETURN VALUE > For calloc() and malloc(), the value returned is a pointer to the > allocated memory, which is suitably aligned for any kind of > variable, or NULL if the request fails. > > This could get pretty confusing if NULL was a valid address... Internally the library can use mmap(). Presumably they will map a MAP_FAILED return code from mmap() to a NULL return code in malloc(). Chris - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/