Hi,

In my case 2 child processes from mtest01w try to allocate 1GB each and third one allocates around 100 MB.
Both of the first 2 child processes throws this error "errno=ENOMEM(12): Cannot allocate memory" around 700MB. And third successfully finishes its job.
Here are some details.
* Actual physical memory: 80MB
* Swap space is 2GB
* /proc/sys/vm/overcommit_memory is 1
* /proc/sys/vm/overcommit_ratio is 50

Can somebody please tell me why this might be happening?

Regards,
Shashank J Bilgi


On Tue, Jul 30, 2013 at 6:47 PM, SHASHANK BILGI <shashank192@gmail.com> wrote:
Hi,

In my case 2 child processes from mtest01w try to allocate 1GB each and third one allocates around 100 MB.
Both of the first 2 child processes throws this error "errno=ENOMEM(12): Cannot allocate memory" around 700MB. And third successfully finishes its job.
Here are some details.
* Actual physical memory: 80MB
* Swap space is 2GB
* /proc/sys/vm/overcommit_memory is 1
* /proc/sys/vm/overcommit_ratio is 50

Regards,
Shashank J Bilgi


On Wed, Jul 17, 2013 at 7:27 PM, <chrubis@suse.cz> wrote:
Hi!
> I have one more query, when i run mtest01w on my target, it gives a message
> "stopped at 731906048 bytes: errno=ENOMEM(12): Cannot allocate memory".
>
> Should this be considered as a test case failure, If not, why?

That is hard to say without further analysis.

Generally malloc() is allowed to return ENOMEM when machine memory was
used up.

But conditions under this happens depends on ulimits, memory overcommit
settings, size and availability of swap etc.

--
Cyril Hrubis
chrubis@suse.cz