From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13415 invoked by alias); 22 Jun 2006 18:35:03 -0000 Received: (qmail 13342 invoked by uid 22791); 22 Jun 2006 18:35:00 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.12) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Jun 2006 18:34:57 +0000 Received: from lois.corp.google.com (lois.corp.google.com [172.24.0.50]) by smtp-out.google.com with ESMTP id k5MIYljJ014681; Thu, 22 Jun 2006 11:34:47 -0700 Received: from smtp.google.com (mordor.corp.google.com [192.168.15.226]) by lois.corp.google.com with ESMTP id k5MIYkdA003167 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Jun 2006 11:34:46 -0700 Received: from localhost.localdomain.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) (authenticated bits=0) by smtp.google.com (8.13.6/8.13.6) with ESMTP id k5MIYjPd031534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Jun 2006 11:34:45 -0700 To: sonatabar bar Cc: gcc-help@gcc.gnu.org Subject: Re: Maximum Allocatable Dynamic Memory References: <20060622142626.85577.qmail@web36203.mail.mud.yahoo.com> From: Ian Lance Taylor Date: Thu, 22 Jun 2006 18:35:00 -0000 In-Reply-To: <20060622142626.85577.qmail@web36203.mail.mud.yahoo.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg00180.txt.bz2 sonatabar bar writes: > I am trying to test what is the maximum allocatable > dynamic memory on a give machine. For my surprise I > see wonders happening, and I don't have an > explaination to it. I understand a bit that, it > doesn't have to do with compilers entirely, and hece > seeking explaination. > > this test fails allocating memory for index 68561 > which means => allocated memory is (68561000000*8) > bytes =>X > => X/1024/1024/1024 = 510.82 Gig ??? > > May be I am missing something, tried running it on a 2 > & 4 Gig phyiscal memory machines, with a swap space of > 8Gig. Wrong mailing list. This is not a gcc question. It is a kernel or a library question. I believe the answer is that the kernel permits you to allocate as many pages as you like, but when you actually try to use them and it looks for a place to put them, it will fail. I am not an expert, though. Ian