c - How can I malloc 8*10^9 int memory? -


I need an 8 * 10 ^ 9 int array .... I know how much memory a limit is One program can make Molok (SIZE_MAX) but there is a way to change it? I am using gcc 4.6 (mingw) thx in advance.

  #include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; int main () {int i, j; Int m = 2000 * 2000, n = 2000; int ** matrix; Matrix = molk (m * size (integer *)); For (i = 0; i    

If you have enough RAM and you are turned on There is a 64-bit system, you should be able to allocate it in a large part. If no condition is met, then you are in trouble. There is no sensible way to work on such a large array on 32-bit systems, and there is not much sense in trying to work on that array which is not fit in memory if SIZE_MAX Not sufficiently large, then SIZE_MAX is the only symptom, not the reason.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -