Support pinning in HostAllocator
[alexxy/gromacs.git] / src / gromacs / utility / allocator.h
index 50ee1f0834ef4960065a1acf0b777d3d5df6a323..3d243adb7142b2aed977372fae54dc904342f733 100644 (file)
@@ -201,6 +201,12 @@ class Allocator : public AllocationPolicy
             AllocationPolicy::free(p);
         }
 
+        //! Return the policy object for this allocator.
+        AllocationPolicy getPolicy() const
+        {
+            return *this;
+        }
+
         /*! \brief Construct an object without allocating memory
          *
          * \tparam Args  Variable-length list of types for constructor args