ae.sys.memory

Memory and GC stuff.

Members

Functions

gcRan
bool gcRan()

Did the GC run since this function's last call on this thread? Not 100% reliable (due to false pointers).

inCollect
bool inCollect()

Checks if we are inside a GC collection cycle. This is currently done in a dumb and expensive way, so use sparingly.

onStack
bool onStack(const(void)* p)

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.

Meta

Authors

Vladimir Panteleev <vladimir@thecybershadow.net>

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.