lkml.org 
[lkml]   [1999]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Bug? Allocation of too much memory hangs system, kernel 2.2.*
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.243 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site