diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-11 17:38:09 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-11 17:38:09 +0100 |
commit | dc79e956b628bb71a3ecbfdab6edd19ce6cf918f (patch) | |
tree | d1770397e511ed3f230e03d983bc4c3c7cb1e36c /core/templates/paged_allocator.h | |
parent | 9e967ebdf90e32fb93a7895a19a4111e72d9c660 (diff) | |
parent | a7317748135e064ff150072f2f46ccc1d2c4b358 (diff) | |
download | redot-engine-dc79e956b628bb71a3ecbfdab6edd19ce6cf918f.tar.gz |
Merge pull request #86587 from RandomShaper/wtp_enhance
Enhance & fix `WorkerThreadPool`
Diffstat (limited to 'core/templates/paged_allocator.h')
-rw-r--r-- | core/templates/paged_allocator.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/templates/paged_allocator.h b/core/templates/paged_allocator.h index 6f3f78d4d2..d880eae0c3 100644 --- a/core/templates/paged_allocator.h +++ b/core/templates/paged_allocator.h @@ -40,7 +40,7 @@ #include <type_traits> #include <typeinfo> -template <class T, bool thread_safe = false> +template <class T, bool thread_safe = false, uint32_t DEFAULT_PAGE_SIZE = 4096> class PagedAllocator { T **page_pool = nullptr; T ***available_pool = nullptr; @@ -53,10 +53,6 @@ class PagedAllocator { SpinLock spin_lock; public: - enum { - DEFAULT_PAGE_SIZE = 4096 - }; - template <class... Args> T *alloc(Args &&...p_args) { if (thread_safe) { |