lkml.org 
[lkml]   [1999]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bug? Allocation of too much memory hangs system, kernel 2.2.*
On Sun, 30 May 1999, Juergen Vollmer wrote:

>-------------------------------------
> # 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;
>}
>-------------------------------------

[..]
155
156
157
158
159
160
161
162
163
164
165
Bus error
/andrea@laser:~$ ulimit -s
unlimited
andrea@laser:~$

The system was quite responsive in the meantime (even before the
segfault). I have 128mbyte of ram and 70mbyte of swap (all in the same IDE
HD). You can try my VM running my latest andrea patches.

Andrea Arcangeli


-
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.037 / U:1.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site