Tommy Reynolds (
Tue, 25 Sep 2001 14:46:11 -0500

Pavel Machek <> was pleased to say:

> Hi!
> I need to alloc as much memory as possible, *but not more*. I do not
> want to OOM-kill anything. How do I do this? Tried GFP_KERNEL, will
> oom-kill. GFP_USER will OOM-kill, too.

Try GFP_ATOMIC; GFP_KERNEL sets the __GFP_WAIT flag and you don't want that.
But, if you're really asking how to know how large the current working set is,
so that you don't grab more than your applications are going to need and
eventually OOM, you'll need to set GFP_HAVE_CRYSTAL_BALL ;-)


Tommy Reynolds | Red Hat, Inc. (Embedded Development) | "The quickest way to do anything 307 Wynn Drive NW, Huntsville, AL 35805 USA | is right the first time." | - The Lieutenant (Rick Phone: +1.256.704.9286 | Jason), "Combat!", Mobile: +1.919.641.2923 | 1962 TV series FAX: +1.256.837.3839 | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at