Physical memory allocation
Throughout Genode, physical memory is allocated in the form of RAM dataspaces by using the Ram_allocator interface. This interface is implemented by the PD session and thereby allows a component to use its RAM budget. The RAM dataspaces allocated from the Ram_allocator interface may serve as backing store for fine-grained component-local allocators such as the Heap (Section Component-local allocators).
Constraining RAM allocations
The operations of the Ram_allocator interface are the basis for Genode's RAM accounting. In cases where a server needs to allocate RAM on behalf of its clients, the interface provides a natural hook to track and constrain the client-specific RAM usage. The Constrained_ram_allocator implements the interface by forwarding all operations to another Ram_allocator instance while restricting allocations to a quota limit. Exceeding the limit results in an Out_of_ram exception.