mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 06:59:32 +03:00
fix STL deallocate passing count (instead of size) to mi_free_size
This commit is contained in:
parent
dbe721de39
commit
3e982a3813
1 changed files with 1 additions and 1 deletions
|
@ -357,7 +357,7 @@ template<class T> struct mi_stl_allocator {
|
||||||
mi_stl_allocator() mi_attr_noexcept { }
|
mi_stl_allocator() mi_attr_noexcept { }
|
||||||
mi_stl_allocator(const mi_stl_allocator& ) mi_attr_noexcept { }
|
mi_stl_allocator(const mi_stl_allocator& ) mi_attr_noexcept { }
|
||||||
template<class U> mi_stl_allocator(const mi_stl_allocator<U>& ) mi_attr_noexcept { }
|
template<class U> mi_stl_allocator(const mi_stl_allocator<U>& ) mi_attr_noexcept { }
|
||||||
void deallocate(T* p, size_t size) { mi_free_size(p, size); }
|
void deallocate(T* p, size_t /* count */) { mi_free(p); }
|
||||||
#if (__cplusplus >= 201703L) // C++17
|
#if (__cplusplus >= 201703L) // C++17
|
||||||
T* allocate(size_t count) { return (T*)mi_new_n(count, sizeof(T)); }
|
T* allocate(size_t count) { return (T*)mi_new_n(count, sizeof(T)); }
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue