OmniSciDB  8a228a1076
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

◆ checked_calloc()

void* checked_calloc ( const size_t  nmemb,
const size_t  size 

Definition at line 52 of file checked_alloc.h.

References OutOfHostMemory::OutOfHostMemory().

Referenced by WindowFunctionContext::fillPartitionEnd(), WindowFunctionContext::fillPartitionStart(), InValuesBitmap::InValuesBitmap(), ResultSet::ResultSet(), 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 call graph for this function:
+ Here is the caller graph for this function:

◆ checked_malloc()