[Issue 5219] @noheap annotation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 19 17:43:27 PST 2013


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


Rob T <alanb at ucora.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alanb at ucora.com


--- Comment #8 from Rob T <alanb at ucora.com> 2013-02-19 17:43:24 PST ---
(In reply to comment #7)
> Well, attribute may be an overkill, compiler switch is enough (module-wide
> switch).

We definitely need to mark localized sections of code to be off limits from the
GC. This is because for many applications, only certain sections of code  have
a problem with the GC, while the remaining non-critical sections have no need
to suffer without a GC. I do agree though that some code will have to be 100%
GC disabled, so some means to prevent application wide use of garbage collected
reliant code would be useful.

> 
> Other tool can't know, when compiler decides to alloc, especially a third-party
> tool. This can even depend on compiler switches like optimization.

The 3rd party tool idea makes little sense to me. This is not just an
optimization issue, it's a safety issue and a productivity issue. If the
compiler can tell me I'm using GC collected sections of code in error, that's
many times better than it not telling me anything at all, and leaving it up to
me to figure out where I may be going wrong. As it is right now, disabling the
GC is a very unsafe business because it's far too easy to use something that
does hidden allocations.

--rt

-- 
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