4#include "MRPch/MRBindingMacros.h"
9#if !defined( __EMSCRIPTEN__ ) && !defined( MRMESH_NO_MIMALLOC )
10#define MR_ALLOCATOR_IS_MIMALLOC
13#ifdef MR_ALLOCATOR_IS_MIMALLOC
15#if defined( _MSC_VER ) && !defined( MR_USE_CMAKE_CONFIGURE_FILE )
18#pragma comment( lib, "mimalloc-debug.dll.lib" )
20#pragma comment( lib, "mimalloc.dll.lib" )
31#ifdef MR_ALLOCATOR_IS_MIMALLOC
55#ifdef MR_ALLOCATOR_IS_MIMALLOC
60 if constexpr (
alignof( T ) > __STDCPP_DEFAULT_NEW_ALIGNMENT__ )
62 if ( n > std::size_t( -1 ) /
sizeof( T ) )
63 throw std::bad_array_new_length();
64 return static_cast<T *
>( mi_new_aligned( n *
sizeof( T ),
alignof( T ) ) );
67 return static_cast<T *
>( mi_new_n( n,
sizeof( T ) ) );
69 void deallocate( T * p, std::size_t )
noexcept { mi_free( p ); }
74template <
typename T,
typename U>
bool operator==(const Allocator< T > &, const Allocator< U > &) noexcept
Definition MRAllocator.h:75
void deallocate(T *p, std::size_t) noexcept
Definition MRAllocator.h:69
T * allocate(std::size_t n)
Definition MRAllocator.h:58
std::true_type propagate_on_container_move_assignment
Definition MRAllocator.h:56
Allocator() noexcept=default
T value_type
Definition MRAllocator.h:47
Allocator< U > other
Definition MRAllocator.h:49
Allocator select_on_container_copy_construction() const noexcept
Definition MRAllocator.h:71
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
not mi_stl_allocator: its construct/destroy members stop std containers from memmove-copying and skip...
Definition MRAllocator.h:34
Definition MRAllocator.h:49
Definition MRAllocator.h:46