Home | History | Annotate | Download | only in debase

Lines Matching refs:numBytes

57  * \param numBytes	Number of bytes to allocate.
60 void* deMalloc (size_t numBytes)
64 DE_ASSERT(numBytes > 0);
66 ptr = malloc((size_t)numBytes);
72 memset(ptr, 0xcd, numBytes);
77 VALGRIND_MAKE_MEM_UNDEFINED(ptr, numBytes);
87 * \param numBytes Number of bytes to allocate.
90 void* deCalloc (size_t numBytes)
92 void* ptr = deMalloc(numBytes);
94 deMemset(ptr, 0, numBytes);
101 * \param numBytes New size in bytes
104 void* deRealloc (void* ptr, size_t numBytes)
106 return realloc(ptr, numBytes);
123 size_t numBytes;
136 void* deAlignedMalloc (size_t numBytes, size_t alignBytes)
145 if (posix_memalign(&ptr, ptrAlignedAlign, numBytes) == 0)
159 return _aligned_malloc(numBytes, alignBytes);
162 void* const basePtr = deMalloc(numBytes + alignBytes + sizeof(AlignedAllocHeader));
172 hdr->numBytes = numBytes;
183 void* deAlignedRealloc (void* ptr, size_t numBytes, size_t alignBytes)
186 return _aligned_realloc(ptr, numBytes, alignBytes);
191 if (numBytes > 0)
194 const size_t oldSize = getAlignedAllocHeader(ptr)->numBytes;
201 if (oldSize < numBytes || oldSize > numBytes*2)
204 void* const newPtr = deAlignedMalloc(numBytes, alignBytes);
208 const size_t copyBytes = numBytes < oldSize ? numBytes : oldSize;
228 return deAlignedMalloc(numBytes, alignBytes);
275 size_t numBytes;
319 void* const ptr = deAlignedMalloc(s_alignedAllocCases[caseNdx].numBytes, s_alignedAllocCases[caseNdx].alignment);
324 deMemset(ptr, 0xaa, s_alignedAllocCases[caseNdx].numBytes);