On Tuesday, 18 August 2015 at 10:27:14 UTC, Casper Færgemand wrote:
On Monday, 17 August 2015 at 19:38:21 UTC, Steven Schveighoffer wrote:
// if the GC kicks in here we're f*****
GC.addRange(mem, 512);

Can't you GC.disable around this whole thing?

GC.collect can still be called from another thread.

Good point, also GC.disable doesn't guarantee that the GC will never run. The documentation says that the GC may still run in out of memory or similar situations where it absolutely needs to run. So there isn't a safe way to do this after all.

Reply via email to