RAM session interface

Type definition Genode::Ram_dataspace_capability

Class Genode::Ram_session::Alloc_failed

Inherits from

public Exception

Class Genode::Ram_session::Quota_exceeded

Inherits from

public Alloc_failed

Class Genode::Ram_session

Public functions

alloc

Allocate RAM dataspace

Argument
size_t size Size of ram dataspace
Return

Ram_dataspace_capability Capability to new ram dataspace

avail

Return amount of available quota

Return

size_t

free

Free RAM dataspace

Argument
Ram_dataspace_capability ds Dataspace capability as returned by alloc

quota

Return current quota limit

Return

size_t

ref_account

Define reference account for the RAM session

Argument
Ram_session_capability ram_session Reference account
Return

int 0 on success

Each RAM session requires another RAM session as reference account to transfer quota to and from. The reference account can be defined only once.

service_name

Return

char *

transfer_quota

Transfer quota the another ram session

Arguments
Ram_session_capability ram_session Receiver of quota donation
size_t amount Amount of quota to donate
Return

int 0 on success

Quota can only be transfered if the specified RAM session is either the reference account for this session or vice versa.

used

Return used quota

Return

size_t