Lines Matching refs:xWantedSize
208 void * pvPortMalloc( size_t xWantedSize ) in pvPortMalloc() argument
220 if( xWantedSize > 0 ) in pvPortMalloc()
224 if( heapADD_WILL_OVERFLOW( xWantedSize, xHeapStructSize ) == 0 ) in pvPortMalloc()
226 xWantedSize += xHeapStructSize; in pvPortMalloc()
230 if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) in pvPortMalloc()
233 … xAdditionalRequiredSize = portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ); in pvPortMalloc()
235 if( heapADD_WILL_OVERFLOW( xWantedSize, xAdditionalRequiredSize ) == 0 ) in pvPortMalloc()
237 xWantedSize += xAdditionalRequiredSize; in pvPortMalloc()
241 xWantedSize = 0; in pvPortMalloc()
251 xWantedSize = 0; in pvPortMalloc()
265 if( heapBLOCK_SIZE_IS_VALID( xWantedSize ) != 0 ) in pvPortMalloc()
267 if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) in pvPortMalloc()
275 …while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != heapPROTECT_BLOCK_PO… in pvPortMalloc()
297 … configASSERT( heapSUBTRACT_WILL_UNDERFLOW( pxBlock->xBlockSize, xWantedSize ) == 0 ); in pvPortMalloc()
299 if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) in pvPortMalloc()
305 pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); in pvPortMalloc()
310 pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; in pvPortMalloc()
311 pxBlock->xBlockSize = xWantedSize; in pvPortMalloc()
354 traceMALLOC( pvReturn, xWantedSize ); in pvPortMalloc()