Re: [Mono-dev] Stop Garbage Collection for a Codeblock

2007-03-08 Thread Andreas Nahr
Using the fixed keyword you can prevent the collection of a memory block, however I’m not sure this is what you’re looking for. Also I fail to see how this (by itself) could possibly help with time-critical parts. Greetings Andreas _ Von: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [Mono-dev] Stop Garbage Collection for a Codeblock

2007-03-08 Thread Back, Michael (ext)
Hi Andreas, thanks for this hint - nice feature. But we want that GC does nothing while a special code block ist executed! Thanks Michael Von: Andreas Nahr [mailto:[EMAIL PROTECTED] Gesendet: Thursday, March 08, 2007 10:22 AM An: Back, Michael (ext);

Re: [Mono-dev] Stop Garbage Collection for a Codeblock

2007-03-08 Thread Jonathan Pryor
On Thu, 2007-03-08 at 10:05 +0100, Back, Michael (ext) wrote: Is it possible to stop the GC for garbage collecting for a code block? Simple (yet glib) answer: Don't allocate anything from the GC. If you don't allocate GC memory, then the GC won't get involved. :-) Sadly, this is the safest

Re: [Mono-dev] Stop Garbage Collection for a Codeblock

2007-03-08 Thread Alan McGovern
Just my two cents, The only reason i can think of where you'd require this kind of behaviour is when you need real time processing and any kind of delay could be disasterous. In this case, i wouldn't think C# would be a good choice to implement in. What you could do is write a C program/library

Re: [Mono-dev] Stop Garbage Collection for a Codeblock

2007-03-08 Thread Leszek Ciesielski
AFAIK it is not possible to implement realtime applications in C#. Of the managed languages, there's RealtimeJava (never used it) and Ada. And both have to be run either on a specially modified Unix or on their own micro-OS. Furthermore, I am not sure whether Ada allows GC (opposed to explicit

Re: [Mono-dev] Stop Garbage Collection for a Codeblock

2007-03-08 Thread Paolo Molaro
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

Re: [Mono-dev] Stop Garbage Collection for a Codeblock

2007-03-08 Thread Miguel de Icaza
hello, Is it possible to stop the GC for garbage collecting for a code block? This would be helpful for time critical parts. You would have to modify the GC to expose an API that prevents it running, then you decide what the semantics should be, but be aware that other threads will be