Messages in this thread | | | Date | Sat, 4 Mar 2000 17:35:21 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: Linux 2.2.15pre12 [VM fixes] |
| |
>On Thu, 2 Mar 2000, Burton Windle wrote:
>><linux/version.h> was wrong) was to telnet in as a normal user, and use >>all the RAM I could (perl -e '@a=(a..zzzzzzzzzzz').
See the last thing that perl does before you get in troubles:
brk(0x148c78000) = -1 ENOMEM (Cannot allocate memory) write(2, "Out of memory!\n", 15) = 15 osf_sigprocmask(0x3, 0, 0) = 0 --- SIGINT (Interrupt) ---
Then all mmap/brk fails with -ENOMEM and so the processes exits and perl gets not killed.
To get rid of that use 2.2.15pre13 and set this sysctl at boot:
echo 1 > /proc/sys/vm/overcommit_memory
and perl will be killed immediatly without mistakes then.
The get_free_pages logics wasn't involved at all in your problem, it was mmap/brk that was failing while doing the overcommit check and so nobody was going to request memory anymore.
IMHO perl should exit when it notices there's not enough memory to allocate the array.
Actually I am looking at the overcommit logic since it seems we have a longstanding little problem there (not related to your case though, that's a perl "feature" ;).
Andrea
- 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/
| |