Home | History | Annotate | Download | only in depool

Lines Matching full:numbytes

426 DE_INLINE void* deMemPool_allocInternal (deMemPool* pool, size_t numBytes, deUint32 alignBytes)
442 void* ptr = deAlignedMalloc(numBytes, alignBytes);
466 if (numBytes + alignPadding > (size_t)(curPage->capacity - curPage->bytesAllocated))
470 int newPageCapacity = deMax32(deMin32(2*curPage->capacity, MAX_PAGE_SIZE), ((int)numBytes)+maxAlignPadding);
485 DE_ASSERT(numBytes + alignPadding <= (size_t)curPage->capacity);
488 curPage->bytesAllocated += (int)(numBytes + alignPadding);
496 * \param numBytes Number of bytes to allocate.
499 void* deMemPool_alloc (deMemPool* pool, size_t numBytes)
503 DE_ASSERT(numBytes > 0);
504 ptr = deMemPool_allocInternal(pool, numBytes, DE_POOL_DEFAULT_ALLOC_ALIGNMENT);
513 * \param numBytes Number of bytes to allocate.
517 void* deMemPool_alignedAlloc (deMemPool* pool, size_t numBytes, deUint32 alignBytes)
521 DE_ASSERT(numBytes > 0);
523 ptr = deMemPool_allocInternal(pool, numBytes, alignBytes);
536 void* deMemPool_memDup (deMemPool* pool, const void* ptr, size_t numBytes)
538 void* newPtr = deMemPool_alloc(pool, numBytes);
540 memcpy(newPtr, ptr, numBytes);