This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: runtime committed to cvs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]