Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > My boss so cheap!! Our ASP.NET only have 256MB only! How to release request used memory when Page Unload() event raise?

Reply
Thread Tools

My boss so cheap!! Our ASP.NET only have 256MB only! How to release request used memory when Page Unload() event raise?

 
 
ABC
Guest
Posts: n/a
 
      01-12-2006
My boss so cheap!! Our ASP.NET only have 256MB only! How to release request
used memory when Page Unload() event raise? If not release memory and wait
session time out, it will make very very slow.


 
Reply With Quote
 
 
 
 
Josh Twist
Guest
Posts: n/a
 
      01-12-2006
GC (Garbage Collection) should clean up managed resources for you -
particularly when there is memory pressure, of which I expect there to
be plenty on your low ram servers!

Josh
http://www.thejoyofcode.com/

 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      01-12-2006
I think you have 2 alternatives. You can convince your boss that RAM costs
less than an hour or 2 of developer time, or you can switch to something
like ASP, which uses less memory.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"ABC" <(E-Mail Removed)> wrote in message
news:%23w$(E-Mail Removed)...
> My boss so cheap!! Our ASP.NET only have 256MB only! How to release
> request used memory when Page Unload() event raise? If not release memory
> and wait session time out, it will make very very slow.
>
>



 
Reply With Quote
 
Friso Wiskerke
Guest
Posts: n/a
 
      01-12-2006
You cal call the GC.Collect() method. This doesn't clean-up resources
immediately but does clean them up faster than if you just wait for the GC
to do it's job....

You're better off ripping the 256MB RAM out your bosses PC and claiming it
for yourself . Then let's see how fast he'll buy some xtra DIMMs'

Greetz,
Friso Wiskerke

"Josh Twist" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> GC (Garbage Collection) should clean up managed resources for you -
> particularly when there is memory pressure, of which I expect there to
> be plenty on your low ram servers!
>
> Josh
> http://www.thejoyofcode.com/
>



 
Reply With Quote
 
Jim Cheshire
Guest
Posts: n/a
 
      01-12-2006
Friso Wiskerke wrote:
> You cal call the GC.Collect() method. This doesn't clean-up resources
> immediately but does clean them up faster than if you just wait for
> the GC to do it's job....
>


You really shouldn't do this. If you call GC.Collect indiscriminately, you
just end up throwing off the GC's collection algorithm and things will be
worse off. There are times when an explicit call to GC.Collect is warranted.
This isn't one of them.

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry:
Getting the PID and TID of a COM Call

Describes how to get the PID of the
dllhost process a COM call is executing
in and how to locate the thread as well.



 
Reply With Quote
 
ABC
Guest
Posts: n/a
 
      01-13-2006
The boss's points as:

1. SD-RAM is old ram, if buy new SD-RAM, it will noused for future!
2. If add RAM, it is cost!!
3. Don't to spend money any hardware!!

so cheap boss!!!





"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I think you have 2 alternatives. You can convince your boss that RAM costs
>less than an hour or 2 of developer time, or you can switch to something
>like ASP, which uses less memory.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> You can lead a fish to a bicycle,
> but it takes a very long time,
> and the bicycle has to *want* to change.
>
> "ABC" <(E-Mail Removed)> wrote in message
> news:%23w$(E-Mail Removed)...
>> My boss so cheap!! Our ASP.NET only have 256MB only! How to release
>> request used memory when Page Unload() event raise? If not release
>> memory and wait session time out, it will make very very slow.
>>
>>

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      01-13-2006
Hardware is the single least expensive cost factor in software development.

Man-hours are the single most expensive cost factor in software development.

so stupid boss!!!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"ABC" <(E-Mail Removed)> wrote in message
news:OI38ki%(E-Mail Removed)...
> The boss's points as:
>
> 1. SD-RAM is old ram, if buy new SD-RAM, it will noused for future!
> 2. If add RAM, it is cost!!
> 3. Don't to spend money any hardware!!
>
> so cheap boss!!!
>
>
>
>
>
> "Kevin Spencer" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>I think you have 2 alternatives. You can convince your boss that RAM costs
>>less than an hour or 2 of developer time, or you can switch to something
>>like ASP, which uses less memory.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> .Net Developer
>> You can lead a fish to a bicycle,
>> but it takes a very long time,
>> and the bicycle has to *want* to change.
>>
>> "ABC" <(E-Mail Removed)> wrote in message
>> news:%23w$(E-Mail Removed)...
>>> My boss so cheap!! Our ASP.NET only have 256MB only! How to release
>>> request used memory when Page Unload() event raise? If not release
>>> memory and wait session time out, it will make very very slow.
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Luke Dalessandro
Guest
Posts: n/a
 
      01-13-2006
GC should do a pretty good job of this. You could try forcing it by
writing a custom IHttpHandler with something like this code in it's
Process routine:

using (Page page =
(Page)PageParser.GetCompiledPageInstance(context.R equest.CurrentExecutionFilePath,
context.Request.PhysicalPath, context))
{
page.ProcessRequest(context);
}

I'm not sure what kind of result this will have. The page variable will
be dealocated after the ProcessRequest call. I don't know what kind of
threading issues there are here.

See http://msdn2.microsoft.com/library/yh598w02.aspx for "using"
information.

Luke

ABC wrote:
> My boss so cheap!! Our ASP.NET only have 256MB only! How to release request
> used memory when Page Unload() event raise? If not release memory and wait
> session time out, it will make very very slow.
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sybex wants to know, have you used our book's for Security+ testprep? JKellum Computer Security 0 01-14-2009 10:19 PM
ati Radeon X850XT 256MB or Geforce 7800GS CO Superclock 256MB? burn2782@hushmail.com Computer Information 2 04-19-2006 09:20 PM
HEXUS.reviews :: ASUS EAX1800XL 256MB & HIS Excalibur X1800 XL 256MB PCIe graphics... Silverstrand Front Page News 0 12-07-2005 03:35 AM
Can I have 2 IP addresses on our internal interface on our cisco pix firewall bgamblin@spvg.com Cisco 1 09-08-2005 08:54 PM
Why IIS could not release DLL which have been used in ASP page. Bo ASP General 2 02-25-2005 11:30 AM



Advertisments