Upgrade session before quota exceedes

Denis Huber huber.denis at ...435...
Thu Aug 25 16:32:17 CEST 2016

Dear Genode community,

I want to dynamically create Region maps through an RM session (amount 
not known at compile time). If the RAM quota of the session exceedes, I 
want to upgrade the RAM quota of the session.

For this case I wrote a small test [1] which creates Region maps until 
an exception is thrown and I tried to catch it. I realized that the 
exception was thrown in another thread (core's entrypoint probably), 
meaning I cannot catch it in my test component's thread.


For a better insight I logged the RAM quota consumption in 
Rm_session_component::create. The output of my test looks as follows:

[init -> rm_stresser] --- Rm-creation-stresser started ---
[init -> rm_stresser] Round 0
Alloc avail: 49152
[init -> rm_stresser] Round 1
Alloc avail: 36864
[init -> rm_stresser] Round 2
Alloc avail: 24576
[init -> rm_stresser] Round 3
Alloc avail: 12288
[init -> rm_stresser] Round 4
Alloc avail: 0
[init -> rm_stresser] Round 5
Quota exceeded! amount=61440, size=8192, consumed=61440
Uncaught exception of type 'Genode::Allocator::Out_of_memory'
Warning: abort called - thread: entrypoint

Is there an easy way to upgrade a session's RAM quota before allocating 
objects with no available RAM?
If there is already a component in Genode which solves my problem, I 
would love to see the source code :)

Kind regards,

More information about the users mailing list