Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S271411AbTG2L7x (ORCPT ); Tue, 29 Jul 2003 07:59:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S271412AbTG2L7x (ORCPT ); Tue, 29 Jul 2003 07:59:53 -0400 Received: from crosslink-village-512-1.bc.nu ([81.2.110.254]:60143 "EHLO lxorguk.ukuu.org.uk") by vger.kernel.org with ESMTP id S271411AbTG2L7w (ORCPT ); Tue, 29 Jul 2003 07:59:52 -0400 Subject: Re: malloc problem to allocate very large blocks From: Alan Cox To: nagendra_tomar@adaptec.com Cc: Tung-Han Hsieh , Linux Kernel Mailing List , jamagallon@able.es In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Message-Id: <1059479571.3118.3.camel@dhcp22.swansea.linux.org.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 29 Jul 2003 12:52:51 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 899 Lines: 18 On Maw, 2003-07-29 at 05:58, Nagendra Singh Tomar wrote: > AFAIK malloc will not return you memory more than the total virtual memory > (RAM+swap) in the system. So if you want more than 2GB allocations from > malloc, make sure you have at least 2GB virtual mem, keeping aside some > space for the kernel. On the default memory settings it may do. However a request for 2Gb of memory requires there is a free 2Gb of address space to map it into - which may not be true because of things like shared libraries. The actual total allocatable limit for x86 is a bit under 3Gb, but you won't get that as one linear allocation. (1Gb is kernel mappings) - 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/