On Wednesday, 9 October 2013 at 20:10:40 UTC, Justin Whear wrote:
Related to the latter, it would be really nice to be able to
prove that a section of code makes no heap allocations/GC
collections.
As a quick temporary thing, how about gc_throw_on_next(); ?
That'd just set a thread local flag that gc_malloc checks and if
it is set, immediately resets it and throws an AllocAssertError.
My thought is this could be quickly and easily implemented
pending a better solution and in the mean time can be used in
unit tests to help check this stuff.