partial free/split for ds
Christian Helmuth
christian.helmuth at genode-labs.com
Thu Nov 5 09:36:41 CET 2020
Hello Alexander,
On Mon, Nov 02, 2020 at 23:55:07 CET, Alexander Tormasov via users wrote:
> I have a physical memory which is used for populated managed dataspace, like
> Dataspace_capability ds = env.ram().alloc(SIZE);
> void * base_rw = env.rm().attach(ds);
> memset(base_rw, 0xff, SIZE);
> env.rm().detach(base_rw);
>
> I use it as backend for mmap and found, that I need to be able to change mapping in the standard way which used for this mmap/munmap interface.
>
> Typically, I want to free a part of this ds, e.g., in the middle of it.
> Like UUUUUU -> UUUFFU (where Used and Free abbreviation used), keeping mapping and content for all old addresses except freed ones, in the «middle» of area [base_rw, base_rw+SIZE) from above.
>
> How I can do this?
> Probably after operation I will have 2 ds instead of original one;
> Anyway, I do not want to loose the content of old ds during this procedure,
> and want to get rid of copy of old content to new one.
> Is it possible to split ds in such a way?
> From code of Region_map_component::detach I see that I can detach only from the beginning of the region.
How about using multiple dataspaces (chunks) in the first place, ie.
each U is a separate dataspace and all dataspaces are mapped into a
consecutive region in virtual memory?
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