By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,633 Members | 1,053 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,633 IT Pros & Developers. It's quick & easy.

How to force outofmemory exception throw

P: n/a
In the production environment, it always occurs and the worker process
did not recycle automatically. Therefore, it make the system service break
to client.

In development environment, we write a program to loop sth and force
outofmemory throw. however, when the w3wp exceed physical mem,
the process recycle automatically, no outofmemory throw.

Any idea?
thank you
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I personally have never seen this happen.

However, I would imagine that if the system is SO maxed out as to throw an
OutOfMemory exception, I am pretty certain that either throwing a new
exception, or wrapping a new exception around it would only make matters
worse.

Suppose you did something like this:

<vb>
Try
' all your stuff
Catch exc As OutOfMemoryException
GC.Collect()
Finally
' Only you know what.
End Try
</vb>

<C# [I think]>
try {
// all your stuff
} catch OutOfMemoryException {
GC.Collect()
} finally {
// only you know what.
}
</C#>
--
Peace & happy computing,

Mike Labosh, MCSD
"Working here is like living inside a Salvador Dali painting." -- Me. Yeah,
ME! [Oh fer cryin out loud]
"Ricky Chan" <Ri*******@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
In the production environment, it always occurs and the worker process
did not recycle automatically. Therefore, it make the system service break
to client.

In development environment, we write a program to loop sth and force
outofmemory throw. however, when the w3wp exceed physical mem,
the process recycle automatically, no outofmemory throw.

Any idea?
thank you

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.