Messages in this thread | | | From | "Tom Leete" <> | Subject | Re: Bug? Allocation of too much memory hangs system, kernel 2.2.* | Date | Mon, 31 May 1999 00:55:44 -0400 |
| |
Hello,
1) foo() does not terminate. 2) foo() eats an automatic sizeof(int) Meg each call. Never released since no foo call ever exits.
I suspect you have about 1.5 Gig VM+RAM on this system.
The OS can't really spot pathological programs for you. I imagine it hangs because it has noplace left to run.
Regards Tom
-----Original Message----- From: Juergen Vollmer <vollmer@cocolab.de> > If you like you can send me your recursive proggy and I'll try to run it > here.
Please try the following:
------------------------------------- # include "stdio.h"
static int count = 0; # define MAX (1024*1024) void foo(){ char a[MAX]; int i;
printf ("%d\n", count++);
for (i = 0; i < MAX; i += 100) { a[i] = i % 256; }
foo(); } int main(){ foo(); return 0; } -------------------------------------
after printing 375, the system stops as described in my problem report.
Jürgen
- 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/
| |