diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2017-10-21 14:01:57 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2017-10-21 14:01:57 +0300 |
commit | 807d3c42be29d4ab2d8533c699c743c041f4ce6b (patch) | |
tree | 5ecd1504125363823a607540d1e346cc7f7cf819 /server/TracySlab.hpp | |
parent | 07cb693cbb7604906c3c8ba973d2c465cc731387 (diff) |
Use slab allocator for server allocations.
Diffstat (limited to 'server/TracySlab.hpp')
-rw-r--r-- | server/TracySlab.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/TracySlab.hpp b/server/TracySlab.hpp index cb85b663..ef2f5048 100644 --- a/server/TracySlab.hpp +++ b/server/TracySlab.hpp @@ -57,6 +57,12 @@ public: return (T*)AllocRaw( sizeof( T ) ); } + template<typename T> + T* Alloc( size_t size ) + { + return (T*)AllocRaw( sizeof( T ) * size ); + } + void Unalloc( size_t size ) { assert( size <= m_offset ); |