1 #ifndef NPSTAT_ALLOCATORS_HH_
2 #define NPSTAT_ALLOCATORS_HH_
23 unsigned sizeofStackBuffer)
25 if (sizeNeeded > sizeofStackBuffer || stackBuffer == 0)
26 return new T[sizeNeeded];
35 if (thisBuffer != stackBuffer)
40 template <
typename T1,
typename T2>
47 for (
unsigned long i=0;
i<len; ++
i)
48 *dest++ = static_cast<T1>(*source++);
63 for (
unsigned long i=0;
i<len; ++
i)
69 #endif // NPSTAT_ALLOCATORS_HH_
void copyBuffer(T1 *dest, const T2 *source, const unsigned long len)
T * makeBuffer(unsigned sizeNeeded, T *stackBuffer, unsigned sizeofStackBuffer)
void clearBuffer(T *buf, const unsigned long len)
static std::string const source
void destroyBuffer(T *thisBuffer, const T *stackBuffer)