diff --git a/core/templates/paged_allocator.h b/core/templates/paged_allocator.h index 72425a8c3d7..6f3f78d4d2a 100644 --- a/core/templates/paged_allocator.h +++ b/core/templates/paged_allocator.h @@ -58,7 +58,7 @@ public: }; template - T *alloc(const Args &&...p_args) { + T *alloc(Args &&...p_args) { if (thread_safe) { spin_lock.lock(); } @@ -99,6 +99,10 @@ public: } } + template + T *new_allocation(Args &&...p_args) { return alloc(p_args...); } + void delete_allocation(T *p_mem) { free(p_mem); } + private: void _reset(bool p_allow_unfreed) { if (!p_allow_unfreed || !std::is_trivially_destructible::value) {