norman.feske at ...1...
Thu Oct 20 13:38:55 CEST 2011
> I am trying to use GDB. It works fine with test-gdb_monitor, but with
> my own program I run in to memory quota problems. I tried to fix it
> through the config file but it did not seem to help.
> Any clues?
> Quota exceeded: gdb_monitor
> memory for slab: 4096
> used quota: 2175192
> ds_size: 2138112
> sizeof(Ram_session_component): 216
> quota_limit: 3862528
> [init -> gdb_monitor] C++ runtime: Genode::Ram_session::Quota_exceeded
> [init -> gdb_monitor] void* abort(): abort called
this message tells me that GDB monitor runs out of RAM quota. This can
be explained as follows: When started, GDB monitor passes almost all of
its own RAM quota to the target process and keeps only a fixed amount
for itself. However, the amount needed in practice is not known at this
point because GDB monitor's memory consumption depends on the behaviour
of the target.
For example, GDB monitor has to copy ROM dataspaces requested by the
target to RAM dataspaces in order to be able to patch the text segments
of shared libraries (which are obtained by the target via ROM sessions).
The memory for holding the RAM copy is accounted to the GDB monitor.
Consequently, if the target creates a lot of ROM sessions, GDB monitor's
RAM quota might exceed. I expect that this is the case in your scenario.
As a quick fix, I'd suggest to increase the amount of quota that GDB
monitor keeps for itself. You can do this by changing:
ports/src/app/gdb_monitor/main.cc (line 66)
Maybe we should think about making this value configurable via the
Dr.-Ing. Norman Feske
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users