partial free/split for ds

Michael Grunditz michael.grunditz at gmail.com
Mon Nov 9 20:01:50 CET 2020


On Mon, 9 Nov 2020 at 14:03, Alexander Tormasov via users
<users at lists.genode.org> wrote:
>
> sorry, this is not working...
>
> any other ideas how to split single ds without copy of the content?
>
Hi Alexander,

I have used a perhaps crude solution that you might find useful. In
RISC OS which is the system I usually code for , it is a bad idea to
allocate a lot of small spaces. So I use a "freelist". Simply a list
with memory addresses as keys and a notion if area is free or used and
size. When application needs mem, it looks at the table. First it
tries to find a free slot with >= required size. If none found , add a
new entry. If ram isn't needed , just tell the list that it is free.
This might give you fragmented space , but it can be programmed to
reorganised , and I guess that many times the size of areas will be
the same.

Not a Genode specific solution , and not sure if it covers your needs.

Michael



More information about the users mailing list