OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
checked_alloc.h File Reference
#include <boost/stacktrace.hpp>
#include <cstdlib>
#include <ostream>
#include <stdexcept>
#include <string>
#include "../Logger/Logger.h"
#include "../Shared/types.h"
+ Include dependency graph for checked_alloc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OutOfHostMemory
 
struct  CheckedAllocDeleter
 

Macros

#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED   1
 

Functions

void * checked_malloc (const size_t size)
 
void * checked_calloc (const size_t nmemb, const size_t size)
 

Macro Definition Documentation

#define BOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED   1

Definition at line 20 of file checked_alloc.h.

Function Documentation

void* checked_calloc ( const size_t  nmemb,
const size_t  size 
)
inline

Definition at line 52 of file checked_alloc.h.

Referenced by WindowFunctionContext::fillPartitionEnd(), WindowFunctionContext::fillPartitionStart(), InValuesBitmap::InValuesBitmap(), and ResultSet::syncEstimatorBuffer().

52  {
53  auto ptr = calloc(nmemb, size);
54  if (!ptr) {
55  throw OutOfHostMemory(nmemb * size);
56  }
57  return ptr;
58 }

+ Here is the caller graph for this function: