For me with fork(), Out Of Memory (ENOMEM) comes from kernel,
not libc. It happens on my Computer with 24Mbytes memory.
When tried on a computer with 32Mbytes memory, I can fill
all the process table, and get EAGAIN.
As far as i've seen inside the kernel, kernel/fork.c,
Out of memory in returned by do_fork(), after a failure in
copy_sighand().
It seems that kmalloc do not try to free pages by swappingout.
It just failed.
If I've a process that randomly allocates and frees memory with
malloc/free, pages are swapped out and freed, so I can fullfill
process table.
christophe leroy
-
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/