DIP18: Non-GC threads
SomeDude
lovelydear at mailmetrash.com
Sun Sep 2 14:07:11 PDT 2012
On Saturday, 1 September 2012 at 02:52:23 UTC, bearophile wrote:
> 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
It looks very much that several annotations are actually directed
at the compiler or the runtime for specific optimisations.
The @ could be used (or are used) as local compiler switches or
runtime hints.
More information about the Digitalmars-d
mailing list