OmniSciDB  94e8789169
 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.


class  OutOfHostMemory
struct  CheckedAllocDeleter




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

Macro Definition Documentation


Definition at line 20 of file checked_alloc.h.

Function Documentation

void* checked_calloc ( const size_t  nmemb,
const size_t  size 

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: