Lines Matching refs:xWantedSize
156 void * pvPortMalloc( size_t xWantedSize ) in pvPortMalloc() argument
164 if( xWantedSize > 0 ) in pvPortMalloc()
168 if( heapADD_WILL_OVERFLOW( xWantedSize, xHeapStructSize ) == 0 ) in pvPortMalloc()
170 xWantedSize += xHeapStructSize; in pvPortMalloc()
174 if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) in pvPortMalloc()
177 … xAdditionalRequiredSize = portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ); in pvPortMalloc()
179 if( heapADD_WILL_OVERFLOW( xWantedSize, xAdditionalRequiredSize ) == 0 ) in pvPortMalloc()
181 xWantedSize += xAdditionalRequiredSize; in pvPortMalloc()
185 xWantedSize = 0; in pvPortMalloc()
195 xWantedSize = 0; in pvPortMalloc()
217 if( heapBLOCK_SIZE_IS_VALID( xWantedSize ) != 0 ) in pvPortMalloc()
219 if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) in pvPortMalloc()
226 … while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) in pvPortMalloc()
244 if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) in pvPortMalloc()
249 pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); in pvPortMalloc()
253 pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; in pvPortMalloc()
254 pxBlock->xBlockSize = xWantedSize; in pvPortMalloc()
272 traceMALLOC( pvReturn, xWantedSize ); in pvPortMalloc()