OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
checked_alloc.h File Reference
#include "Shared/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 53 of file checked_alloc.h.

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

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

+ Here is the caller graph for this function: