D vs. ISRs (interrupt service routines) or Which D language features implictly allocate memory?

janderson askme at me.com
Sat May 5 02:49:09 PDT 2007


> It would be very useful to have the ability to tag a scope of
> code as "native" or "pure" or "some_better_keyword" so the D compiler
> would issue an error for any expressions or statements within that scope
> that implicitly allocate/resized memory. Thoughts, comments?

I agree, that would be nice.  I think it maybe a bit difficult to do it 
statically with things like functions that are in other libraries.  I 
don't think that it's impossible though.

I've used a run-time variant in the past to speed up rendering (it would 
assert if any memory was allocated during the alloted time.  Perhaps 
tango could provide a debugging option to assert when allocations are 
made, or something like that.

-Joel



More information about the Digitalmars-d mailing list