[Mono-dev] Stop Garbage Collection for a Codeblock
skolima at gmail.com
Thu Mar 8 07:36:44 EST 2007
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 memory freeing) at all when run in RealTime mode.
This said, if all you require is really fast processing (not
http://en.wikipedia.org/wiki/Real-time_computing ), then pay close
attention what you feed to GC, this should be enough...
On 3/8/07, Alan McGovern <alan.mcgovern at gmail.com> wrote:
> 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 which does that
> really special task and call it so that it will remain unaffected by the GC
> and will do it's realtime processing in peace.
> Hope that helps,
> On 3/8/07, Jonathan Pryor <jonpryor at vt.edu> wrote:
> > 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 solution. If you disable the GC and the GC
> > heap runs out of space, what should happen? An OutOfMemoryException is
> > probably the only viable choice, which would likely be worse for you
> > than just having the GC intervene.
> > - Jon
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
MS-DOS user since 5.0
Windows user since 3.11
Linux user since kernel 2.4
Novell Netware user since 2.2
WARCRAFT user since 1.0
More information about the Mono-devel-list