Lines Matching refs:numBytes

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