Re: ENOMEM failure on mmap call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi :)

2011/10/13 Ezequiel García <elezegarcia@xxxxxxxxxxxx>:
>
> --- El jue 13-oct-11, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> 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 see, so 8 MB each.... and since you created 10 threads, I suppose
that would commit 8*10=80 MB of RAM. CMIIW here.... (stack are
individual, so they aren't shared between threads)

> 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.

I agree....as you can see there, there is some percentage of VM
preserved for root...also for hugetlb etc.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux