Advertisements

"Vadym Stetsyak" wrote in message
news:eUb0%...
: I have a legacy ASP application, which is full of memory leaks. The source
: of the leaks are ADO objects that were not closed.
: For exapmle "Open" recordset without "Close" and so on.
:
: As the application is rather big, manually parsing asp code is rather
: painfully.
:
: Are there any asp code parsing tools, to analyze the source code?

Not sure but objects are defined with the word 'set'. So it shouldn't be
that hard to find them.

Advertisements

Yes, that is not too difficult.
Also when you call Open for the recordset object and do not call Close it is
the source of mem leaks.

So to detect the mem leak I have to debug the page under different
conditions, it takes time. That is why I posted this message, about code
analyzers...

"Roland Hall" <nobody@nowhere> wrote in message
news:#...
> "Vadym Stetsyak" wrote in message
> news:eUb0%...
> : I have a legacy ASP application, which is full of memory leaks. The
source
> : of the leaks are ADO objects that were not closed.
> : For exapmle "Open" recordset without "Close" and so on.
> :
> : As the application is rather big, manually parsing asp code is rather
> : painfully.
> :
> : Are there any asp code parsing tools, to analyze the source code?
>
> Not sure but objects are defined with the word 'set'. So it shouldn't be
> that hard to find them.
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>

Gazing into my crystal ball I observed "Vadym Stetsyak" <>
writing in news:#:
> Yes, that is not too difficult.
> Also when you call Open for the recordset object and do not call Close
> it is the source of mem leaks.
>
> So to detect the mem leak I have to debug the page under different
> conditions, it takes time. That is why I posted this message, about
> code analyzers...

You could roll your own. Using FSO, you could read the files and search
for ".Open". If ".Open" was found, then search for ".Close". If ".Close"
was not found, then you could find the name of the recordset using MID
function, and then write to the document. Just a thought, not tested.
>
>
> "Roland Hall" <nobody@nowhere> wrote in message
> news:#...
>> "Vadym Stetsyak" wrote in message
>> news:eUb0%...
>> : I have a legacy ASP application, which is full of memory leaks. The
>> : source of the leaks are ADO objects that were not closed.
>> : For exapmle "Open" recordset without "Close" and so on.
>> :
>> : As the application is rather big, manually parsing asp code is
>> : rather painfully.
>> :
>> : Are there any asp code parsing tools, to analyze the source code?
>>
>> Not sure but objects are defined with the word 'set'. So it shouldn't
>> be that hard to find them.
>>
>> --
>> Roland Hall
>> /* This information is distributed in the hope that it will be useful,
>> but without any warranty; without even the implied warranty of
>> merchantability or fitness for a particular purpose. */
>> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
>> WSH 5.6 Documentation -
>> http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library -
>> http://msdn.microsoft.com/library/default.asp
>>
>>
>
>
>

At first I thought of something like injecting additional code
after the "Set", "Open", "Close" statements
the code would be something like

Server.Execute("report.asp?page=test.asp&line=34&var=rs&action=open")

and on report.asp gather the statistics. It will be like obtaining dynamic
call stack of the page.

We can parse an asp file statically, but we shall not be able to reproduce
dynamic behavior ( conditions based on some values and so on )
"Adrienne" <> wrote in message
news:Xns9662183FDC240arbpenyahoocom@207.115.63.158...
> Gazing into my crystal ball I observed "Vadym Stetsyak" <>
> writing in news:#:
>
> > Yes, that is not too difficult.
> > Also when you call Open for the recordset object and do not call Close
> > it is the source of mem leaks.
> >
> > So to detect the mem leak I have to debug the page under different
> > conditions, it takes time. That is why I posted this message, about
> > code analyzers...
>
> You could roll your own. Using FSO, you could read the files and search
> for ".Open". If ".Open" was found, then search for ".Close". If ".Close"
> was not found, then you could find the name of the recordset using MID
> function, and then write to the document. Just a thought, not tested.
>
> >
> >
> > "Roland Hall" <nobody@nowhere> wrote in message
> > news:#...
> >> "Vadym Stetsyak" wrote in message
> >> news:eUb0%...
> >> : I have a legacy ASP application, which is full of memory leaks. The
> >> : source of the leaks are ADO objects that were not closed.
> >> : For exapmle "Open" recordset without "Close" and so on.
> >> :
> >> : As the application is rather big, manually parsing asp code is
> >> : rather painfully.
> >> :
> >> : Are there any asp code parsing tools, to analyze the source code?
> >>
> >> Not sure but objects are defined with the word 'set'. So it shouldn't
> >> be that hard to find them.
> >>
> >> --
> >> Roland Hall
> >> /* This information is distributed in the hope that it will be useful,
> >> but without any warranty; without even the implied warranty of
> >> merchantability or fitness for a particular purpose. */
> >> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> >> WSH 5.6 Documentation -
> >> http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library -
> >> http://msdn.microsoft.com/library/default.asp
> >>
> >>
> >
> >
> >
>
>
>
> --
> Adrienne Boswell
> http://www.cavalcade-of-coding.info
> Please respond to the group so others can share

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!