On Wed, Jan 19, 2000 at 07:32:48PM +0100, [EMAIL PROTECTED] wrote:
> > Perhaps you can do something like this:
> >
> >   Event->timer(interval => 2, cb => sub {
> >     warn 'Event memory: ' . join ' ', Event::_memory_counters()
> >   });
> 
> I see. I took my first steps and recognized the format:
> 
> 00002000000000000000
> 
> So, there are two watchers of type 4. Unfortunately, I'm going to install a lot of 
>watchers
> simultaniously, so it is hard to read what
> 
> 0000297000000000000000
> 
> really means.
> 
> I suggest a format change. Maybe the slots could be seperated by a non digit, e.g. 
>this way
> 
> 0-0-0-0-297-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0.
> 
> This would be helpful.

Huh?  _memory_counters() returns an array.  You can formatted it as well
or badly as you like.  :-)

> Later on - but this is NOT really necessary to run checks, only a thought - there 
>could be constants
> indicating which slot means which type of watcher. (For now, a grep on the C sources 
>makes it clear.)

I sympathize, but if you need a heavy duty memory debugger then you
might consider linking with one of the debugging malloc libraries. This
little event feature is just a stop gap.

-- 
"Does `competition' have an abstract purpose?"
       via, but not speaking for Deutsche Bank

Reply via email to