We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a1c06d commit 0567c5dCopy full SHA for 0567c5d
core/templates/paged_allocator.h
@@ -58,7 +58,7 @@ class PagedAllocator {
58
};
59
60
template <class... Args>
61
- T *alloc(const Args &&...p_args) {
+ T *alloc(Args &&...p_args) {
62
if (thread_safe) {
63
spin_lock.lock();
64
}
@@ -99,6 +99,10 @@ class PagedAllocator {
99
100
101
102
+ template <class... Args>
103
+ T *new_allocation(Args &&...p_args) { return alloc(p_args...); }
104
+ void delete_allocation(T *p_mem) { free(p_mem); }
105
+
106
private:
107
void _reset(bool p_allow_unfreed) {
108
if (!p_allow_unfreed || !std::is_trivially_destructible<T>::value) {
0 commit comments