From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31925 invoked by alias); 30 Aug 2005 21:08:03 -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 28724 invoked by uid 22791); 30 Aug 2005 21:07:13 -0000 Received: from eastrmmtao01.cox.net (HELO eastrmmtao01.cox.net) (68.230.240.38) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 30 Aug 2005 21:07:13 +0000 Received: from white ([68.9.64.121]) by eastrmmtao01.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20050830210712.OSYE9903.eastrmmtao01.cox.net@white>; Tue, 30 Aug 2005 17:07:12 -0400 Received: from bob by white with local (Exim 3.36 #1 (Debian)) id 1EADJj-0000Qp-00; Tue, 30 Aug 2005 17:06:51 -0400 Date: Tue, 30 Aug 2005 21:08:00 -0000 From: Bob Rossi To: Nicolas Ouellette Cc: gcc-help@gcc.gnu.org Subject: Re: maximum number of variables? Message-ID: <20050830210651.GA1358@white> Mail-Followup-To: Nicolas Ouellette , gcc-help@gcc.gnu.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-SW-Source: 2005-08/txt/msg00315.txt.bz2 On Tue, Aug 30, 2005 at 05:00:57PM -0400, Nicolas Ouellette wrote: > Hello > > I am presently running a huge code following the hydrodynamical evolution > of a system (in 2 dimentions). I store the quantities evolving (density, > velocity, pressure) into large 2-D arrays. Recently, I tried to make my > 2-D arrays bigger (to study a bigger system) and eventually, I reached a > certain point where I was getting a "segmentation error". The only thing I > changed was the size of my arrays. > > I deleted a few arrays that were redundant (making my code less user > friendly), and I found that I could slightly increase the size of my arrays > until I reached the "segmentation error". > > Here are my questions: 1) Is there a maximum number of variables allowed > when using gcc? (from my experience I am guessing yes) 2) Is there a way to > increase the number of variables allowed when using gcc? It sounds like you may have overflowed the stack. Could you try increasing the stack size? I don't know how to do that though with gcc. Bob Rossi