Re: maximum array size?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux