Memory and GC stuff.
Did the GC run since this function's last call on this thread? Not 100% reliable (due to false pointers).
Checks if we are inside a GC collection cycle. This is currently done in a dumb and expensive way, so use sparingly.
Is the given pointer located on the stack of the current thread? Useful to assert on before taking the address of e.g. a struct member.