OmniSciDB  b24e664e58
 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 "../Shared/types.h"
#include "Shared/Logger.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 48 of file checked_alloc.h.

Referenced by QueryMemoryInitializer::allocateCountDistinctBitmap(), anonymous_namespace{Execute.cpp}::fill_entries_for_empty_input(), WindowFunctionContext::fillPartitionEnd(), WindowFunctionContext::fillPartitionStart(), InValuesBitmap::InValuesBitmap(), and ResultSet::syncEstimatorBuffer().

48  {
49  auto ptr = calloc(nmemb, size);
50  if (!ptr) {
51  throw OutOfHostMemory(nmemb * size);
52  }
53  return ptr;
54 }

+ Here is the caller graph for this function: