Why application request RAM quota from parent even if it is enough?

Christian Helmuth christian.helmuth at genode-labs.com
Thu Sep 5 11:51:19 CEST 2019


Alexander,

On Thu, Sep 05, 2019 at 11:36:40 CEST, Alexander Tormasov via users wrote:
> Thank you for pointing out, seems that they really start from such
> reservation attempt ( 512 << 20 ).

Let me do the calculation

  512 << 20 = 536870912  (bytes)

  (512 << 20) / 1024. / 1024 / 1024 = 0.5  (GiB)

As long as "they" do not want to reserve (512 << 20) KiB there must be
some miscalculation.

> Anyway, system should not hang even if I request 512gb of ram, it
> should return with error...
> This is standard approach - we try to alloc until we can, receiving
> ENOMEM or something similar?
> Why it is not working?

The current mmap(MAP_ANONYMOUS) implementation seems to strive for
satisfaction of the application by not probing the allocation but
enforcing it. This ends up in the request for more RAM resources as
you traced.

Greets
-- 
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth



More information about the users mailing list