Disable GC entirely

Manu turkeyman at gmail.com
Tue Apr 9 23:26:34 PDT 2013


On 10 April 2013 16:14, Rainer Schuetze <r.sagitario at gmx.de> wrote:

>
>
> On 08.04.2013 05:12, Manu wrote:
>
>> The GC really needs to be addressed in terms of performance; it can't stop
>> the world for milliseconds at a time. I'd be happy to give it ~150us every
>> 16ms, but NOT 2ms every 200ms.
>> Alternatively, some urgency needs to be invested in tools to help
>> programmers track accidental GC allocations.
>>
>
> I'm not sure if these have been proposed already in this long thread, but
> 2 very small patches could help a lot for realtime applications:
>
> 1. a thread local flag to disallow and detect GC allocations
> 2. a flag per thread to specify that the thread should not be paused by
> the GC during collections.
>
> The latter would then put the responsibility on the programmer to ensure
> that no references are mutated in the non-pausing thread that don't exist
> anywhere else (to avoid the collection of objects used in the realtime
> thread). As anything in a realtime thread usually has to be pre-allocated
> anyway, that doesn't put a lot more constraints on it but to ensure having
> references to the pre-allocated data in other threads or global state.
>

It's all rather useless without some powerful tools for tracking down
leaks, and unintended allocations though. There will surely be bugs with
this idea, and finding them will be a nightmare.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130410/a41d98db/attachment.html>


More information about the Digitalmars-d mailing list