ENOMEM failure on mmap call

Ezequiel García elezegarcia at yahoo.com.ar
Thu Oct 13 12:37:59 EDT 2011


--- El jue 13-oct-11, Mulyadi Santosa <mulyadi.santosa at gmail.com> escribió:

> this is what I am not clear, do those 10 threads allocate 8
> MB each?
> or 8 MB total? remember that threads share address space by
> default...
> 

I am sorry maybe I explained myself incorrectly, threads don't actually
allocate anything; just mmap it's own stack space (8MB each). 

I looked at the link you provided me and I found this:

http://lxr.linux.no/linux+v3.0.4/mm/mmap.c#L112

mmap.c, line 112: vm_enough_memory()

It seems here is where the mm subsystem decides to fail with ENOMEM
and uses commit parameters to decide... I found it most interesting.

Ezequiel.




More information about the Kernelnewbies mailing list