Re: Unusual memory allocation problem

Thomas Wouters (thomas@xs4all.net)
Tue, 15 Sep 1998 01:25:35 +0200


On Mon, Sep 14, 1998 at 10:04:27PM +0530, Chetan Kumar wrote:

> Take a look at this piece of code, I compiled this with gcc ver
> 2.7.2.1 on linux box 2.0.30, with i486, 8M ram and 16M swap, to my surpise
> I did not get any error, the code succeeded allocating 400*2M mem !!!!
>
> On the other hand on a sloaries I could promplty get error Could not find
> free space.
> Any this buggy !?!

It isn't buggy, it's supposed to be like that. Try writing something to
every location, you'll see your program will crash at about 20 to 16 MB,
depending on what else is running on your machine. On less recent 2.1
kernels, the machine would hang, btw, not crash, but I'm not sure if that
behavious has changed since then. I'm talking middle-thirties here, i
haven't done such tests since then.

-
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/