mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-19 13:39:31 +03:00
Avoid compilation error when passing in heap to allocators
Before it would not work to create the mi_heap_stl_allocator types with passing in a "mi_heap_t*", since sizeof is used and it gives a compilation error. This change fixes that.
This commit is contained in:
parent
1d2f003a4e
commit
b0876ab878
1 changed files with 1 additions and 0 deletions
|
@ -488,6 +488,7 @@ template<class T1,class T2> bool operator!=(const mi_stl_allocator<T1>& , const
|
||||||
#define MI_HAS_HEAP_STL_ALLOCATOR 1
|
#define MI_HAS_HEAP_STL_ALLOCATOR 1
|
||||||
|
|
||||||
#include <memory> // std::shared_ptr
|
#include <memory> // std::shared_ptr
|
||||||
|
#include "mimalloc/types.h"
|
||||||
|
|
||||||
// Common base class for STL allocators in a specific heap
|
// Common base class for STL allocators in a specific heap
|
||||||
template<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : public _mi_stl_allocator_common<T> {
|
template<class T, bool _mi_destroy> struct _mi_heap_stl_allocator_common : public _mi_stl_allocator_common<T> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue