Lines Matching refs:pxBlock

116 #define heapBLOCK_IS_ALLOCATED( pxBlock )        ( ( ( pxBlock->xBlockSize ) & heapBLOCK_ALLOCATED_…  argument
117 #define heapALLOCATE_BLOCK( pxBlock ) ( ( pxBlock->xBlockSize ) |= heapBLOCK_ALLOCATED_B… argument
118 #define heapFREE_BLOCK( pxBlock ) ( ( pxBlock->xBlockSize ) &= ~heapBLOCK_ALLOCATED_… argument
130 …#define heapPROTECT_BLOCK_POINTER( pxBlock ) ( ( BlockLink_t * ) ( ( ( portPOINTER_SIZE_TYPE ) … argument
133 #define heapVALIDATE_BLOCK_POINTER( pxBlock ) \ argument
136 ( ( uint8_t * ) ( pxBlock ) >= pucHeapLowAddress ) && \
137 ( ( uint8_t * ) ( pxBlock ) < pucHeapHighAddress ) )
141 #define heapPROTECT_BLOCK_POINTER( pxBlock ) ( pxBlock ) argument
143 #define heapVALIDATE_BLOCK_POINTER( pxBlock ) argument
210 BlockLink_t * pxBlock; in pvPortMalloc() local
272 pxBlock = heapPROTECT_BLOCK_POINTER( xStart.pxNextFreeBlock ); in pvPortMalloc()
273 heapVALIDATE_BLOCK_POINTER( pxBlock ); in pvPortMalloc()
275 …while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != heapPROTECT_BLOCK_PO… in pvPortMalloc()
277 pxPreviousBlock = pxBlock; in pvPortMalloc()
278 pxBlock = heapPROTECT_BLOCK_POINTER( pxBlock->pxNextFreeBlock ); in pvPortMalloc()
279 heapVALIDATE_BLOCK_POINTER( pxBlock ); in pvPortMalloc()
284 if( pxBlock != pxEnd ) in pvPortMalloc()
293 pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; 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()
322 xFreeBytesRemaining -= pxBlock->xBlockSize; in pvPortMalloc()
335 heapALLOCATE_BLOCK( pxBlock ); in pvPortMalloc()
336 pxBlock->pxNextFreeBlock = NULL; in pvPortMalloc()
655 BlockLink_t * pxBlock; in vPortGetHeapStats() local
660 pxBlock = heapPROTECT_BLOCK_POINTER( xStart.pxNextFreeBlock ); in vPortGetHeapStats()
664 if( pxBlock != NULL ) in vPortGetHeapStats()
666 while( pxBlock != pxEnd ) in vPortGetHeapStats()
672 if( pxBlock->xBlockSize > xMaxSize ) in vPortGetHeapStats()
674 xMaxSize = pxBlock->xBlockSize; in vPortGetHeapStats()
680 if( pxBlock->xBlockSize != 0 ) in vPortGetHeapStats()
682 if( pxBlock->xBlockSize < xMinSize ) in vPortGetHeapStats()
684 xMinSize = pxBlock->xBlockSize; in vPortGetHeapStats()
690 pxBlock = heapPROTECT_BLOCK_POINTER( pxBlock->pxNextFreeBlock ); in vPortGetHeapStats()