Hi, fuer ein Finite-Element-Programm in C, muesste ich unbedingt mehr als 2Gb Speicher allokieren. Der Rechner hat 2Gb Speicher und 2Gb Swap. Ich habe erst gedacht, es liegt am Kernel (CONFIG_HIGHMEM ist gesetzt), habe jetzt aber festgestellt, dass es nicht moeglich ist in C eine Integer zu deklarieren, die groesser als 2^31 ist.
[EMAIL PROTECTED]:~/ugspeicher/test-proc> cat testint.c #include <stdlib.h> int main(void){ long long int a=2200000000; int b=2200000000; int c=2000000000; printf("a=%d\n",a); printf("b=%d\n",b); printf("c=%d\n",c); exit(0); } [EMAIL PROTECTED]:~/ugspeicher/test-proc> gcc testint.c testint.c: In function `main': testint.c:4: warning: decimal constant is so large that it is unsigned testint.c:5: warning: decimal constant is so large that it is unsigned [EMAIL PROTECTED]:~/ugspeicher/test-proc> ./a.out a=-2094967296 b=-2094967296 c=2000000000 Hab schon mehrere Compiler ausprobiert (unter anderem auch Borland auf Windows) und in den manpage von gcc nach optionen gesucht. (2.4.21 hab ich auch schon getestet) Der Kernel hat auch keine Probleme mit grossen Zahlen: [EMAIL PROTECTED]:~/ugspeicher/test-proc> echo "2^31"|bc 2147483648 [EMAIL PROTECTED]:~/ugspeicher/test-proc> echo "2^32"|bc 4294967296 [EMAIL PROTECTED]:~/ugspeicher/test-proc> echo "2^100"|bc 1267650600228229401496703205376 Und noch was: [EMAIL PROTECTED]:~/ugspeicher/test-proc> ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 7168 virtual memory (kbytes, -v) unlimited Hat jemand ne Ahnung, oder ne Idee? Gruss Achim -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject "unsubscribe". Probleme? Mail an [EMAIL PROTECTED] (engl)