GC, the simple solution
Walter Bright
newshound at digitalmars.com
Thu Jun 8 22:18:24 PDT 2006
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.
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.
Also, you can use malloc and free in D, in exactly the same way you
would in C.
More information about the Digitalmars-d
mailing list