[Issue 5219] @noheap annotation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 19 07:18:27 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5219


SHOO <zan77137 at nifty.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zan77137 at nifty.com


--- Comment #5 from SHOO <zan77137 at nifty.com> 2010-11-19 07:17:10 PST ---
I agree this suggestion. This is not only performance but also behavior.

When GC runs, it is a very huge cause of trouble to lack in real-time
processing.
All programs may not work under the abundant resources.
There are software that put emphasis on point that should work in limited
resource and limited duration like embedded software.
There are software that cannot offer performance to be satisfied with 
if they don't control it by a high-speed period of 1,000Hz like haptic device
controlling.
There are software to control the medical device that the delay of moment takes
the human life. 
It is fatal to lack in this property.
Of course it will be impossible to encode not to use GC at all. In that case,
you may move processing to another thread that never use GC.
It is not important that a heap is assigned, and it is important that GC does
not work. Therefore I prefer "@nogc" to @noheap.

On the other hand, there is a problem of the readability.
It does not appear on the code even if I introduced a profile to observe a
behavior of the real-time processing.
The property is clear if @nogc/@noheap is given to the attribute of the
function.
It is the best that the thing which wants not to be compiled is not compiled.
And I think it to be the information that a compiler can grasp like nothrow.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list