runtime committed to cvs

Frank Ch. Eigler fche@redhat.com
Thu Mar 10 05:38:00 GMT 2005


Hi -

hunt wrote:

> [...]
> > As mentioned before, this is
> > not appropriate in the context of an embedded probe that could easily
> > gobble up GFP_ATOMIC memory.  I believe support for preallocation of
> > such data, including strings, is critical.  
> 
> Currently only small amounts of memory (the length of a string or two)
> are allocated using GFP_ATOMIC.  

Really?  I see lots of chunks like
     m->key1.str = _stp_alloc(strlen(map->c_key1.str) + 1);
     strcpy(m->key1.str, map->c_key1.str);
throughout the map code.

> All the memory allocations are written to be able to plug in a
> different allocation system later.  

Maybe OK, though it would be unfortunate to require a custom malloc
implementation in the runtime just because of an impression that
arbitrary length strings are necessary.

> For now this hasn't been a problem.  [...]

I posit that is simply because the code hasn't run much in adverse
enough environments.  Consider trying a module that allocates and
deallocates a hundred thousand stringy map elements.

- FChE



More information about the Systemtap mailing list