public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "John S. Fine" <johnsfine@verizon.net>
To: Anna Sidera <sidera.anan@ucy.ac.cy>
Cc: gcc-help@gcc.gnu.org
Subject: Re: maximum array size?
Date: Thu, 15 Apr 2010 15:31:00 -0000	[thread overview]
Message-ID: <4BC709D3.7000206@verizon.net> (raw)
In-Reply-To: <f63f9bcd168f4.4bc6f7f3@ucy.ac.cy>

Anna Sidera wrote:
> int **bufferc = malloc((inp_par_a*inp_par_b+2)*sizeof(int *));
> int *bufferc_aux = malloc((inp_par_a*inp_par_b+2)*(inp_par_c+1)*sizeof(int));
> int bfc=1;
> bufferc[bfc]=bufferc_aux+bfc*(inp_par_c+1);
> bufferc[bfc][0]=0;
>   
How big are you talking about?  What are the values of inp_par_a, 
inp_par_b, and inp_par_c

You ought to be able to allocate a chunk of memory as large as all your 
unused swap space plus a large part of your unused ram.  Even if Linux 
has already "committed" all that unused memory to other tasks that have 
reserved it without yet using it, Linux will commit it again to your task.

So if you aren't talking about a chunk big enough to exceed all unused 
swap space plus a big part of unused ram, then you probably have some 
bug other than trying to commit too much memory.


  parent reply	other threads:[~2010-04-15 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15  9:17 Anna Sidera
2010-04-15 10:17 ` Brian Budge
2010-04-15 12:43   ` Brian Budge
2010-04-15 15:31 ` John S. Fine [this message]
     [not found]   ` <f61380541765a.4bc757a9@ucy.ac.cy>
2010-04-15 16:00     ` John S. Fine
2010-04-16 13:48       ` Anna Sidera
2010-04-16 13:51       ` Anna Sidera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC709D3.7000206@verizon.net \
    --to=johnsfine@verizon.net \
    --cc=gcc-help@gcc.gnu.org \
    --cc=sidera.anan@ucy.ac.cy \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).