MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::Allocator< T > Struct Template Reference

#include <MRMesh/MRAllocator.h>

Inheritance diagram for MR::Allocator< T >:

Classes

struct  rebind

Public Types

using value_type = T
using propagate_on_container_move_assignment = std::true_type

Public Member Functions

 Allocator () noexcept=default
template<typename U>
 Allocator (const Allocator< U > &) noexcept
T * allocate (std::size_t n)
void deallocate (T *p, std::size_t) noexcept
Allocator select_on_container_copy_construction () const noexcept

Detailed Description

template<typename T>
struct MR::Allocator< T >

allocator of MeshLib containers that benefit from mimalloc: mimalloc explicitly, std::allocator in Emscripten builds, where malloc is mimalloc already (-sMALLOC=mimalloc), and with MRMESH_NO_MIMALLOC; a class rather than an alias, so that container types are spelled the same on all platforms (e.g. in the C bindings generated once); the bindings only see it as a template argument of containers


The documentation for this struct was generated from the following file: