[Mono-dev] Stop Garbage Collection for a Codeblock
Paolo Molaro
lupus at ximian.com
Thu Mar 8 10:16:32 EST 2007
On 03/08/07 Back, Michael (ext) wrote:
> Is it possible to stop the GC for garbage collecting for a code block?
> This would be helpful for time critical parts.
>
> I think about something like gc_barrierer_on and gc_barrierer_off.
>
> If such possibility doesn't exists, may be it could implemented and
> improve mono :-)
There is no API exposed in corlib that does that, though internally the
Boehm GC can do that: as the mono code is out there you could easily
expose the two needed internal calls. This may mean, though, that you
could get a nice OutOfMemory exception if the heap can't be expanded.
Make also sure you pre-jitted all the code needed.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list