Messages in this thread | | | Date | Wed, 27 Oct 1999 14:42:55 +0200 (CEST) | From | Rik van Riel <> | Subject | Re: (fwd) Re: Why Linux CRASHES when process overscome swap memory ????? |
| |
On Wed, 27 Oct 1999, M Sweger wrote: > Francois THIEBOLT wrote: > > Got students writting progs (beginners & pros...), one of them made a > > test : > > > > #include <stdio.h> > > #include <stdlib.h> > > > > int main() > > { > > char *mem; > > const size_t TAILLE=1048576; > > > > while (1) > > { > > mem=(char *)malloc(TAILLE); > > } > > } > > > > Then linux start to allocate memory, then it uses memory swap and then > > it crashes (even mouse isn't responding)...then Reset. > > > > Got a RHL 6.0 128MB RAM + 1x128MB swap partition...any clue ? > > Why does a car crash when you drive it into a wall? This is > a classic "then don't do that" question.
There are situations, however, where you can't control all of your users. Sounds like I should push to have my "OOM-killer" patch integrated after all (with a few improvements).
FYI: that patch contains some code to select the "guilty" process and kill it when the system runs out of memory and swap.
cheers,
Rik -- the flu hits, the flu hits, the flu hits, more ... -- The Internet is not a network of computers. It is a network of people. That is its real strength. -- work at: http://www.reseau.nl/ home at: http://www.nl.linux.org/~riel/
- 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/
| |