Dune Core Modules (2.6.0)

Dune::MallocAllocator< T > Class Template Reference

Allocators implementation which simply calls malloc/free. More...

#include <dune/common/mallocallocator.hh>

Public Member Functions

 MallocAllocator () noexcept
 create a new MallocAllocator
 
template<class U >
 MallocAllocator (const MallocAllocator< U > &) noexcept
 copy construct from an other MallocAllocator, possibly for a different result type
 
 ~MallocAllocator () noexcept
 cleanup this allocator
 
pointer allocate (size_type n, const void *hint=0)
 allocate n objects of type T
 
void deallocate (pointer p, size_type n)
 deallocate n objects of type T at address p
 
size_type max_size () const noexcept
 max size for allocate
 
void construct (pointer p, const T &val)
 copy-construct an object of type T (i.e. make a placement new on p)
 
template<typename ... _Args>
void construct (pointer p, _Args &&... __args)
 construct an object of type T from variadic parameters
 
void destroy (pointer p)
 destroy an object of type T (i.e. call the destructor)
 

Detailed Description

template<class T>
class Dune::MallocAllocator< T >

Allocators implementation which simply calls malloc/free.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Mar 28, 23:30, 2024)