aboutsummaryrefslogtreecommitdiff
path: root/src/allocators.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/allocators.h')
-rw-r--r--src/allocators.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/allocators.h b/src/allocators.h
index b4490ce277..85af8fe376 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -176,6 +176,10 @@ private:
{}
};
+//
+// Functions for directly locking/unlocking memory objects.
+// Intended for non-dynamically allocated structures.
+//
template<typename T> void LockObject(const T &t) {
LockedPageManager::instance.LockRange((void*)(&t), sizeof(T));
}