Wine memory limitation for malloc?

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

 



Why win32 application under Wine can allocate only 2000 MB of memory, but same programm translated by gcc can get 3800 MB.
(OS/Compilers - WinXP/Visual C 6.0 32 bit, and openSUSE 11 x64/gcc -m32)

#include <stdlib.h>
#include <stdio.h>
#include <time.h>

main(int argc, char **argv)
{unsigned long n,m,i; int *p,*p1,*p2,*p3; clock_t time1,time2;
i=4095; if (argc == 2) i = (size_t) strtoul(argv[1], NULL, 0);
m=i*1024*1024; while(  (p=(int*)malloc(m)) ==0 ) m-=1024l*1024l;
printf("Allocated %u MB  ( %u bytes )\n",m/1024l/1024l,m);
getchar(); free(p); exit(0);
}






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux