From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5162 invoked by alias); 9 Jan 2002 11:46:19 -0000 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 Received: (qmail 5123 invoked from network); 9 Jan 2002 11:46:12 -0000 Received: from unknown (HELO finch-post-12.mail.demon.net) (194.217.242.41) by sources.redhat.com with SMTP; 9 Jan 2002 11:46:12 -0000 Received: from mailgate.softwire.co.uk ([62.49.203.138] helo=polarbear) by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1) id 16OHBA-0006nv-0C; Wed, 9 Jan 2002 11:46:00 +0000 From: "Rupert Wood" To: "'Alessandro Mori'" Cc: Subject: RE: dimensioned data Date: Wed, 09 Jan 2002 03:46:00 -0000 Message-ID: <616BE6A276E3714788D2AC35C40CD18D11FE1B@whale.softwire.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <616BE6A276E3714788D2AC35C40CD18D2C51A1@whale.softwire.co.uk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-SW-Source: 2002-01/txt/msg00088.txt.bz2 Alessandro Mori wrote: > I am using gcc and g77 over large array with fixed dimension. I have > not problem using malloc(), but using a fortran code I can only use > a dimensioned data with much less elements (somethings like > 68,000,000 complex*8 elements over a 2GB Ram system). A similar > problem arise with C, as in the attached code. I can't speak for the Fortran case. However, when you 'dimension' a local array in C then it allocates temporary storage from the program stack wheras malloc() allocates memory from the heap. It's up to your operating system how much stack space you're allowed; presumably you're stepping over the limit. It's probably safest to explicitly malloc/free large storage. Rup.