[Mono-devel-list] Limiting Memory Allocation
bmaurer at ximian.com
Fri Apr 15 09:47:15 EDT 2005
On Thu, 2005-04-14 at 23:50 +0100, Jim Purbrick wrote:
> I'm currently working on embeding Mono in a virtual
> world to support user scripting and would like to
> limit the ammount of memory each script object can
> allocate. I'd like to be able to intercept each heap
> allocation and decide whether to allow it on a
> per-script (object) basis. Is this possible? What's
> the best approach?
It is quite possible to intercept each allocation with our profiling
api. However, you can't "disallow" an allocation. I guess you could hack
the runtime to allow you to throw an OOM exception.
More information about the Mono-devel-list