From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3073 invoked by alias); 14 Sep 2004 15:25:31 -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 3060 invoked from network); 14 Sep 2004 15:25:29 -0000 Received: from unknown (HELO tyo202.gate.nec.co.jp) (202.32.8.202) by sourceware.org with SMTP; 14 Sep 2004 15:25:29 -0000 Received: from mailgate3.nec.co.jp (mailgate99.nec.co.jp [10.7.69.186]) by tyo202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i8EFNM212429; Wed, 15 Sep 2004 00:23:22 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i8EFNMl01529; Wed, 15 Sep 2004 00:23:22 +0900 (JST) Received: from fireball.ntsp.nec.co.jp (postfix@[172.28.58.1]) by isgw1.nec.co.jp (8.11.7/3.7W-ISGW-NEC) with ESMTP id i8EFNLj17344; Wed, 15 Sep 2004 00:23:21 +0900 (JST) Received: from the-one (localhost [127.0.0.1]) by fireball.ntsp.nec.co.jp (Postfix) with ESMTP id 233FF29B0D; Tue, 14 Sep 2004 23:24:16 +0800 (HKT) Received: from 172.28.58.4 ([172.28.58.4] helo=galadriel.ntsp.nec.co.jp) by the-one ; 14 Sep 04 15:24:16 -0000 Received: from hq.ntsp.nec.co.jp (frytrix.hq.ntsp.nec.co.jp [172.28.58.129]) by galadriel.ntsp.nec.co.jp (Postfix) with ESMTP id AE0B540202; Tue, 14 Sep 2004 23:22:42 +0800 (PHT) Received: (from smtp@localhost) by hq.ntsp.nec.co.jp (8.9.2/8.9.2) id XAA22963; Tue, 14 Sep 2004 23:22:53 +0800 (HKT) Received: from UNKNOWN(172.28.61.11), claiming to be "[172.28.61.11]" via SMTP by frytrix, id smtpdAAATM0Z6_; Tue Sep 14 15:22:44 2004 Message-ID: <41470D8B.3040604@hq.ntsp.nec.co.jp> Date: Tue, 14 Sep 2004 15:25:00 -0000 From: Ron Michael Khu User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) MIME-Version: 1.0 To: Ankit Jain Cc: gcc , linux prg Subject: Re: References: <20040913111103.77851.qmail@web52901.mail.yahoo.com> In-Reply-To: <20040913111103.77851.qmail@web52901.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00131.txt.bz2 here 's an example of static and dynamic allocation... (my prev example was only about single dimensional arrays...) a 2dimensional array of 4450 x 4450 (change the dimension to 1450 x 1450 if u find the first size to be too big) TEST.C #include int main() { double a[4450][4450]; a[4449][0] = 999; printf( "%lf\n", a[4449][0] ); return 1; } TEST2.c #include int main() { double **a; int i; a = (double**) calloc( 4450, sizeof(double*) ); for ( i=0; i <1450; i++ ) { a[i] = (double*) calloc( 4450, sizeof(double) ); } a[4449][0]=999; printf( "%lf\n", a[4449][0] ); return 1; } Ankit Jain wrote: >hi > >well i am fixed up in a new problem > >i am using a array of size 1024*1024 > >it gives segmentation fault > >it works with 512*512 > >my menory size is 128 mb and 512 swap > >i have enough memory space and using gcc 3.2 v > >may be i need to increase the memory size > >how to do that? > >ankit > >________________________________________________________________________ >Yahoo! Messenger - Communicate instantly..."Ping" >your friends today! Download Messenger Now >http://uk.messenger.yahoo.com/download/index.html >- >To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html > > > >