22 #include "ndbd_malloc.hpp"
38 bool setSize(Uint32 noOfElements,
bool exit_on_error =
true);
76 ndbd_free(theArray,
size *
sizeof(T));
90 if(
size == noOfElements)
93 theArray = (T *)ndbd_malloc(noOfElements *
sizeof(T));
98 ErrorReporter::handleAssert(
"CArray<T>::setSize malloc failed",
99 __FILE__, __LINE__, NDBD_EXIT_MEMALLOC);
117 const Uint32
i = ptr.i;
119 ptr.p = &theArray[
i];
122 ErrorReporter::handleAssert(
"CArray<T>::getPtr", __FILE__, __LINE__);
133 ErrorReporter::handleAssert(
"CArray<T>::getPtr", __FILE__, __LINE__);
144 ptr.p = &theArray[
i];
147 ErrorReporter::handleAssert(
"CArray<T>::getPtr", __FILE__, __LINE__);