Re: Debugging memory allocation

[prev] [thread] [next] [Date index for 2005/05/10]

From: Igor Chudov
Subject: Re: Debugging memory allocation
Date: 19:54 on 10 May 2005
I have a lot of code in a lot of places, and something
like 2-3 hits per second. It is a relatively busy
website. I cannot afford doing what was just
suggested, I would prefer some indirect perl
invocation at the appropriate place. LogHandler seems
like such a place.


i

--- David Nicol <davidnicol@xxxxx.xxx> wrote:

> how about declaring something like 
> 
> sub LogMemoryUsage(){
>    open PIDLOG, ">>pidlog";
>    flock PIDLOG, LOCK_EX;
>    print PIDLOG, "$$ $ENV{SCRIPT_NAME} ",`ps -p $$
> -os`
>    close PIDLOG;
> };
> 
> and then calling LogMemoryUsage() at the beginning
> (and end) of
> every routine that you suspect might have the leak? 
> Examining the
> resulting log would provide clues.
> 
> On 5/10/05, Igor Chudov <ichudov@xxxxx.xxx> wrote:
> > --- Sam Tregar <sam@xxxxxx.xxx> wrote:
> > 
> > > On Mon, 9 May 2005, Igor Chudov wrote:
> > >
> > > > I would like to at least have a log that lists
> > > pid,
> > > > page requested, parameters, starting memory
> and
> > > memory
> > > > after the request was processed. O rsome other
> > > ideas
> > > > like that. Any thoughts?
> 
> 
> -- 
> David L Nicol
> Ask not, "who are you?", but rather, "are you
> allowed?"
> This was always the crucial question anyway.
> (from Marc Stiegler's SecurityPictureBook:
>
http://www.skyhunter.com/marcs/SecurityPictureBook.ppt)
> 


- Igor



		
__________________________________ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs

(message missing)

Debugging memory allocation
Igor Chudov 17:24 on 09 May 2005

Re: Debugging memory allocation
Sam Tregar 18:46 on 09 May 2005

Re: Debugging memory allocation
Perrin Harkins 18:52 on 09 May 2005

Re: Debugging memory allocation
Igor Chudov 19:32 on 10 May 2005

Re: Debugging memory allocation
David Nicol 19:51 on 10 May 2005

Re: Debugging memory allocation
Igor Chudov 19:54 on 10 May 2005

Re: Debugging memory allocation
David Nicol 20:59 on 10 May 2005

Re: Debugging memory allocation
Igor Chudov 21:03 on 10 May 2005

Re: Debugging memory allocation
Stas Bekman 20:26 on 10 May 2005

Re: Debugging memory allocation
Perrin Harkins 21:01 on 10 May 2005

Generated at 15:53 on 25 May 2005 by mariachi v0.52