Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

GC and Out of Memory notifications

$
0
0

Hi,

Is there a way to be notified that a CLR application ran out of memory. My application is memory intensive and uses a lot of libraries. Unfortunately, some of these libraries swallow exceptions ( try{...} catch(){} ) and the application cannot deal appropriately with this situation.

I would love to have an event on the GC class telling me that an OOM exception was raised (even if swallowed by some piece of code).

GC.OutOfMemory += () => System.Environment.FailFast("OOM!");


SCD


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>