Lines Matching refs:numBytes
64 void* deMalloc (size_t numBytes) in deMalloc() argument
68 DE_ASSERT(numBytes > 0); in deMalloc()
70 ptr = malloc((size_t)numBytes); in deMalloc()
76 memset(ptr, 0xcd, numBytes); in deMalloc()
81 VALGRIND_MAKE_MEM_UNDEFINED(ptr, numBytes); in deMalloc()
94 void* deCalloc (size_t numBytes) in deCalloc() argument
96 void* ptr = deMalloc(numBytes); in deCalloc()
98 deMemset(ptr, 0, numBytes); in deCalloc()
108 void* deRealloc (void* ptr, size_t numBytes) in deRealloc() argument
110 return realloc(ptr, numBytes); in deRealloc()
127 size_t numBytes; member
140 void* deAlignedMalloc (size_t numBytes, size_t alignBytes) in deAlignedMalloc() argument
149 if (posix_memalign(&ptr, ptrAlignedAlign, numBytes) == 0) in deAlignedMalloc()
163 return _aligned_malloc(numBytes, alignBytes); in deAlignedMalloc()
166 void* const basePtr = deMalloc(numBytes + alignBytes + sizeof(AlignedAllocHeader)); in deAlignedMalloc()
176 hdr->numBytes = numBytes; in deAlignedMalloc()
187 void* deAlignedRealloc (void* ptr, size_t numBytes, size_t alignBytes) in deAlignedRealloc() argument
190 return _aligned_realloc(ptr, numBytes, alignBytes); in deAlignedRealloc()
195 if (numBytes > 0) in deAlignedRealloc()
198 const size_t oldSize = getAlignedAllocHeader(ptr)->numBytes; in deAlignedRealloc()
205 if (oldSize < numBytes || oldSize > numBytes*2) in deAlignedRealloc()
208 void* const newPtr = deAlignedMalloc(numBytes, alignBytes); in deAlignedRealloc()
212 const size_t copyBytes = numBytes < oldSize ? numBytes : oldSize; in deAlignedRealloc()
232 return deAlignedMalloc(numBytes, alignBytes); in deAlignedRealloc()
279 size_t numBytes; in deMemory_selfTest() member
323 …void* const ptr = deAlignedMalloc(s_alignedAllocCases[caseNdx].numBytes, s_alignedAllocCases[cas… in deMemory_selfTest()
328 deMemset(ptr, 0xaa, s_alignedAllocCases[caseNdx].numBytes); in deMemory_selfTest()