setnewhandler in C#
<p>for creating my own memory management in C# I need to have a possibility to intercept the new command before it returns a null or fires an exception. When using the new command I want to call the original handler first. If this handler fails to return a block of memory, I want to inform all my mappable objects to be written to disk and to free memory.</p>

<p>In C++ there has been a possibility to intercept the new command by assigned a different new handler. In C# I couldn't find anything which shows the same behaviour. </p>

<p>Has anyone seen a possibility to do this.</p>

<p>Thanks
Martin</p>
