heap memory usage in L4 drops/oskit task

Christian Helmuth ch12 at os.inf.tu-dresden.de
Tue Jul 26 14:18:35 CEST 2005


On Tue, Jul 26, 2005 at 11:11:03AM +0200, Bert van Leeuwen wrote:
> How can I check how much heap space is left (or used) in my
> drops/oskit program? Normally (in linux/gnu) I would use getrusage,
> which also returns a number of other useful statistics, but this
> function doesn't seem to exist in drops/oskit...

In "MODE = l4env" you could use one of:

  #include <oskit/lmm.h>

  extern lmm_t malloc_lmm;

  unsigned int free_memory = lmm_avail(&malloc_lmm, 0);

Christian Helmuth

TU Dresden, Dept. of CS
Operating Systems Group

More information about the l4-hackers mailing list