GC, the simple solution
Sean Kelly
sean at f4.ca
Thu Jun 8 23:12:19 PDT 2006
Walter Bright wrote:
> Jeff Parsons wrote:
>> My _only_ significant beef with D so far as been the unbound time for
>> a garbage collection; therefore, if an incremental garbage collector
>> built into D could guarantee me a set maximum time would be taken for
>> each garbage collection (which I would manually induce as often as
>> possible) then unless the efficiency hit is TERRIBLE I would be all
>> over it.
>
> If you're looking for a *guarantee*, then you cannot even use malloc().
> Malloc has unbounded time, and is not predictable.
For what it's worth, I have read papers describing hard real-time
incremental garbage collectors, but I haven't yet seen one available
outside research circles. I'd like to give one a shot at some point,
but I've far too many other distractions to know when that will be.
If anyone is interested however, some of the papers are available here:
http://www.cs.utexas.edu/users/oops/papers.html
See papers 11 and 14.
> The approach most real time programmers use to deal with this is to
> preallocate all needed data before entering the real time section, and
> the real time section does no malloc's or free's.
This is certainly the easiest and probably the safest method.
Sean
More information about the Digitalmars-d
mailing list