Messages in this thread | | | Date | Thu, 15 Oct 1998 21:06:14 +0200 | From | Harald Koenig <> | Subject | what's the limit ? |
| |
why does the small C program below crash in the 2nd line of main() on a Linux 2.0.33/35 with 512M memory and almost all memory free ?
------------------------------------------------------------------------------- # free total used free shared buffers cached Mem: 515644 35804 479840 19068 4676 16000 -/+ buffers: 15128 500516 Swap: 130748 0 130748 # # gcc -v Reading specs from /usr/lib/gcc-lib/i486-linux/2.7.2.1/specs gcc version 2.7.2.1 ------------------------------------------------------------------------------- struct { int kd1[2]; char ab[256 * 1024 * 1024]; int kd2[2]; } chol;
main(int i) { chol.kd1[0] = 0; chol.kd2[0] = 0; } -------------------------------------------------------------------------------
sometimes the size of array ab[] in the structure can be ~250M before crashing, sometimes only ~200-210 MB, on a PC with 128M ram + 128M swap we typically hit a limit of ~180M even if much more virtual space (ram+swap) is free.
what am I missing, which limit are we hitting ?
Harald -- All SCSI disks will from now on ___ _____ be required to send an email notice 0--,| /OOOOOOO\ 24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\ \ \/OOOOOOOOOOOOOOO\ \ OOOOOOOOOOOOOOOOO|// Harald Koenig, \/\/\/\/\/\/\/\/\/ Inst.f.Theoret.Astrophysik // / \\ \ koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |