Handling out-of-memory situation
<p>I have an object that behaves like a cache. It could fill whole available memory if needed.</p>

<p>I'd like to be able to give memory back to an OS on-need basis. So if there is a problem with any other allocation, VM (or GC or whoever) should ask my 'cache' to shrink before failing with OutOfMemory exception.</p>

<p>How can I do it in C#?</p>
