User space memory management library



Hi,

I am in a big company which develop millions of code in an embedded
device. You know in embedded device the memory is very limited and we
want to see which application eats too much memory and at which time.

So is there a library(memory allocater wraper) can do following things:

1) It can record which module/file/line invoke the memory allocater.'
2) How large it allocates.
3) When it allocates.
4) When it frees it.

It seems that in development stage we can use it and in release version
we just define it to standard lib C malloc, free etc...

Just like this:

a (void)
{
libmm_malloc(); // records all the tings
libmm_free();
}

It is possilbe to develop one by ourself, but is there already exists?

Thanks a lot.

ABAI

.



Relevant Pages

  • Re: [PATCH 2/4] slqb: Record what node is local to a kmem_cache_cpu
    ... allocates from the current page until its exhausted. ... more to see if it's compatible with SLQB or not though. ... does SLUB deal with frees from pages that are not the "current" page? ... considers memory policies and cpuset constraints. ...
    (Linux-Kernel)
  • Re: A solution for the allocation failures problem
    ... problem is that in doing so, an implementation of free is doing something not allowed by the standard, which gives it *no* leeway whatsoever to allow the memory to effectively vanish; it expressly requires the memory be available for subsequent allocation, therefore it *cannot* hand it back to the OS - doing so may make it unavailable for further allocation, by the conforming application which has every right to expect the memory is available - free's definition states this, absolutely and unequivocally. ... Then it allocates 10MB+10, then frees it ... jacob at jacob point remcomp point fr ...
    (comp.lang.c)
  • Re: Linked list allocation
    ... where add_item allocates memory for a new list item and returns it (or ... and delete_item frees that memory. ... then all those calls to malloc() become expensive. ...
    (comp.lang.c)
  • Linked list allocation
    ... void delete_item; ... where add_item allocates memory for a new list item and returns it (or ... and delete_item frees that memory. ...
    (comp.lang.c)
  • Re: Advanced linker magic
    ... The embedded device has no MMU, no memory managment and only the ... obtain memory (using mmap) at a virtual address of 0x40000000. ...
    (comp.os.linux.development.apps)