Vowpal Wabbit
Namespaces | Macros | Typedefs | Functions
memory.h File Reference
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <memory>
#include "vw_exception.h"

Namespaces

 VW
 

Macros

#define calloc_mergable_or_throw   calloc_or_throw
 

Typedefs

using free_fn = void(*)(void *)
 
template<class T >
using free_ptr = std::unique_ptr< T, free_fn >
 

Functions

template<class T >
T * calloc_or_throw (size_t nmemb)
 
template<class T >
T & calloc_or_throw ()
 
template<class T >
void destroy_free (void *temp)
 
template<class T , typename... Args>
free_ptr< T > scoped_calloc_or_throw (Args &&...args)
 
template<typename T , typename... Args>
std::unique_ptr< T > VW::make_unique (Args &&...params)
 
void free_it (void *ptr)
 

Macro Definition Documentation

#define calloc_mergable_or_throw   calloc_or_throw

Typedef Documentation

using free_fn = void (*)(void*)
template<class T >
using free_ptr = std::unique_ptr<T, free_fn>

Function Documentation

template<class T >
T* calloc_or_throw ( size_t  nmemb)
template<class T >
T& calloc_or_throw ( )
template<class T >
void destroy_free ( void *  temp)
void free_it ( void *  ptr)
inline
template<class T , typename... Args>
free_ptr<T> scoped_calloc_or_throw ( Args &&...  args)