Mmap and Genode - bug with MAP_ANON?

Norman Feske norman.feske at genode-labs.com
Tue Sep 3 10:22:31 CEST 2019


Hello Alexander,

On 01.09.19 10:45, Alexander Tormasov via users wrote:
> I want to add that addr below is non-0, like 0xc000000000 - for Linux
> and for my test compiled on Genode.

as you just noticed, Genode's mmap support is rudimentary at best. We
took it only as far as needed to accommodate a few common use cases.
There is no plan to support the full feature set of Linux. I.e., mmap'ed
files as mechanism for shared memory would hardly be feasible. As far as
the allocation of anonymous memory via mmap goes, we did not yet
encounter your use case where a virtual address is specified. Hence, the
implementation does not support it.

I just had a glimpse at the 'Libc::Mem_alloc' code in the libc. It is
not impossible but also not straight-forward to extend its interface
with an 'alloc_at' method. Do you see a way around it by adjusting the
3rd-party code to not depend on a specific virtual address?

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

https://www.genode-labs.com · https://genode.org

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