DIP18: Non-GC threads

bearophile bearophileHUGS at lycos.com
Fri Aug 31 19:52:22 PDT 2012


One more comment, a quotation from the DIP18:

>Currently, all functions can use garbage collected memory. 
>Threads that call those functions must be managed by the garbage 
>collector, which may occasionally suspend them to perform 
>collection. This can lead to unwanted pauses, that are not 
>acceptable in some situations, mainly real-time audio/video 
>processing, gaming, and others.<

C heap functions like malloc(), calloc(), realloc() have the same 
problem, their run-time is not deterministic, so if you don't 
want pauses a @noheap is useful.

@noheap is not meant to forbid calling low-level system-specific 
memory allocation functions.

Bye,
bearophile


More information about the Digitalmars-d mailing list