Dataspace Allocation Size and Quota

Norman Feske norman.feske at ...1...
Tue Dec 22 14:45:57 CET 2015

Hi Georg,

welcome to the mailing list!

On 22.12.2015 14:00, Georg Guba wrote:
> This shows 0/32769 on the first print and 28672/32769 on the second
> which is exactly what you'd expect. Allocating 29 KiB with a 32 KiB
> quota, however, will throw a Quota_exceeded exception, still printing
> 0/32769 on the first print.
> It seems you need about 4 KiB of spare quota but I can't seem to find
> any doc on this. How much quota should I actually reserve for simple
> allocations like this and why isn't it simply the same as the actual
> allocation size? I'd like to avoid magic numbers and wasteful allocation
> if possible.

Dataspaces have a granularity of 4KiB. The granularity is dictated by
the size of the smallest possible virtual memory page supported by the
the MMU. This is documented in Section 3.4.1. "Dataspaces" in the manual
[1]. If you allocate a dataspace of a size that is not a multiple of 4
KiB, core will create the smallest-possible dataspace that satisfies the
restriction of the hardware, in your case 32 KiB.



Dr.-Ing. Norman Feske
Genode Labs ·

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