is d-runtime non-gc safe?

Norbert Nemec Norbert at Nemec-online.de
Sun Dec 4 04:59:22 PST 2011


On 04.12.2011 12:53, Jacob Carlborg wrote:
> On 2011-12-03 19:05, Andrej Mitrovic wrote:
>> +1 on interest on having this. Back when I was attempting to port VST
>> to D I got asked by a Steinberg dev how I can guarantee that D plugins
>> will work. But I couldn't guarantee it, if a GC collection were to run
>> the plugin would freeze, the host would crash, and the host company
>> would likely get the blame. A GC-less environment would be great for
>> realtime plugins, I'm not sure how arrays/slices would work, but I
>> guess custom Array refcounted structs could be made or something.
>
> Seems like a very badly designed plugin or plugin system if the host
> crashes when a plugin freezes.
>

Generally, audio-plugin systems are extremely sensitive. The interface 
itself is real-time performance critical and any kind of protection 
against errors in the plugins comes with a run-time penalty.

A freeze in the plugin is relatively harmless and should be caught 
somehow. Still - recovering from it is typically not possible without 
restarting the audio thread.


More information about the Digitalmars-d mailing list