This is the mail archive of the systemtap@sourceware.org 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: Inconsistent behavior of 'delete'


On Fri, 2006-01-06 at 12:36 -0800, Stone, Joshua I wrote:
> WAS: [Bug translator/2115] support some function calls on maps
> fche at redhat dot com wrote:
> > "clear" == "delete MAP"
> 
> I tried this out, and sure enough it works.  But, I noticed that it
> currently only works in two specific cases: deleting one index from a
> map of ints, or deleting an entire map (but not a pmap).

Not working for pmaps is certainly a bug. It also needs to work for
stats. The rest is debatable, but probably desirable for consistency.

Should we consider changing the name to "clear" instead of "delete"?
For maps, delete actually deletes entries, freeing up memory. However,
that doesn't apply to other types.

Martin





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