PLaSK library
Loading...
Searching...
No Matches
memalloc.hpp File Reference
#include <cstdlib>
#include <memory>
#include <utility>
#include <limits>
#include <new>
Include dependency graph for memalloc.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  plask::aligned_deleter< T >
 Aligned deleter for use e.g. More...
 
struct  plask::aligned_deleter< T[]>
 
struct  plask::aligned_allocator< T >
 STL compatible allocator to use with with 16 byte aligned types. More...
 
struct  plask::aligned_allocator< T >::rebind< U >
 

Namespaces

namespace  plask
 Patterson quadrature for complex function along specified line.
 
namespace  plask::detail
 

Macros

#define PLASK_MALLOC_ALIGNED   0
 

Typedefs

template<typename T >
using plask::aligned_unique_ptr = std::unique_ptr< T, aligned_deleter< T > >
 

Functions

voidplask::detail::custom_aligned_malloc (std::size_t size)
 
void plask::detail::custom_aligned_free (void *ptr)
 
voidplask::detail::custom_aligned_realloc (void *ptr, std::size_t size, std::size_t=0)
 
voidplask::aligned_malloc (std::size_t size)
 Allocate size bytes.
 
void plask::aligned_free (void *ptr)
 Free memory allocated with aligned_malloc.
 
voidplask::aligned_realloc (void *ptr, std::size_t new_size, std::size_t old_size=0)
 Reallocate an aligned block of memory.
 
template<typename T >
T * plask::aligned_malloc (std::size_t num=1)
 Create new data with aligned allocation.
 
template<typename T >
void plask::aligned_free (T *ptr)
 Delete data with aligned allocation.
 
template<typename T , typename... Args>
T * plask::aligned_new (Args &&... args)
 Create new object with aligned allocation.
 
template<typename T >
void plask::aligned_delete (T *ptr)
 Delete object with aligned allocation.
 
template<typename T , typename... Args>
T * plask::aligned_new_array (std::size_t num, Args &&... args)
 Create new array with aligned allocation.
 
template<typename T >
void plask::aligned_delete_array (std::size_t num, T *ptr)
 Delete array with aligned allocation.
 

Macro Definition Documentation

◆ PLASK_MALLOC_ALIGNED

#define PLASK_MALLOC_ALIGNED   0

Definition at line 34 of file memalloc.hpp.