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.
May be you can point me to the proper example?
Sincerely,
Alexander