Lines Matching refs:xWantedSize
173 void * pvPortMalloc( size_t xWantedSize ) in pvPortMalloc() argument
181 if( xWantedSize > 0 ) in pvPortMalloc()
185 if( heapADD_WILL_OVERFLOW( xWantedSize, xHeapStructSize ) == 0 ) in pvPortMalloc()
187 xWantedSize += xHeapStructSize; in pvPortMalloc()
191 if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) in pvPortMalloc()
194 … xAdditionalRequiredSize = portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ); in pvPortMalloc()
196 if( heapADD_WILL_OVERFLOW( xWantedSize, xAdditionalRequiredSize ) == 0 ) in pvPortMalloc()
198 xWantedSize += xAdditionalRequiredSize; in pvPortMalloc()
202 xWantedSize = 0; in pvPortMalloc()
212 xWantedSize = 0; in pvPortMalloc()
237 if( heapBLOCK_SIZE_IS_VALID( xWantedSize ) != 0 ) in pvPortMalloc()
239 if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) in pvPortMalloc()
247 …while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != heapPROTECT_BLOCK_PO… in pvPortMalloc()
269 … configASSERT( heapSUBTRACT_WILL_UNDERFLOW( pxBlock->xBlockSize, xWantedSize ) == 0 ); in pvPortMalloc()
271 if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) in pvPortMalloc()
277 pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); in pvPortMalloc()
282 pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; in pvPortMalloc()
283 pxBlock->xBlockSize = xWantedSize; in pvPortMalloc()
326 traceMALLOC( pvReturn, xWantedSize ); in pvPortMalloc()