fix STL deallocate passing count (instead of size) to mi_free_size

This commit is contained in:
daan 2020-01-17 15:58:43 -08:00
parent dbe721de39
commit 3e982a3813
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ template<class T> struct mi_stl_allocator {
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 { }
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
T* allocate(size_t count) { return (T*)mi_new_n(count, sizeof(T)); }
#else