⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 heap_2.lst

📁 Sistema operacional de tempo real
💻 LST
📖 第 1 页 / 共 2 页
字号:
   1              		.code	16
   2              		.file	"heap_2.c"
  10              	.Ltext0:
  11              		.align	2
  12              		.global	vPortFree
  13              		.code 16
  14              		.thumb_func
  16              	vPortFree:
  17              	.LFB3:
  18              		.file 1 "FreeRTOS/Source/portable/MemMang/heap_2.c"
   1:FreeRTOS/Source/portable/MemMang/heap_2.c **** /*
   2:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	FreeRTOS V4.0.0 - Copyright (C) 2003-2006 Richard Barry.
   3:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
   4:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	This file is part of the FreeRTOS distribution.
   5:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
   6:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	FreeRTOS is free software; you can redistribute it and/or modify
   7:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	it under the terms of the GNU General Public License as published by
   8:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	the Free Software Foundation; either version 2 of the License, or
   9:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	(at your option) any later version.
  10:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  11:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	FreeRTOS is distributed in the hope that it will be useful,
  12:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	but WITHOUT ANY WARRANTY; without even the implied warranty of
  13:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	GNU General Public License for more details.
  15:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  16:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	You should have received a copy of the GNU General Public License
  17:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	along with FreeRTOS; if not, write to the Free Software
  18:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  19:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  20:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	A special exception to the GPL can be applied should you wish to distribute
  21:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	a combined work that includes FreeRTOS, without being obliged to provide
  22:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	the source code for any proprietary components.  See the licensing section
  23:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	of http://www.FreeRTOS.org for full details of how and when the exception
  24:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	can be applied.
  25:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  26:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	***************************************************************************
  27:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	See http://www.FreeRTOS.org for documentation, latest information, license
  28:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	and contact details.  Please ensure to read the configuration and relevant
  29:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	port sections of the online documentation.
  30:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	***************************************************************************
  31:FreeRTOS/Source/portable/MemMang/heap_2.c **** */
  32:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  33:FreeRTOS/Source/portable/MemMang/heap_2.c **** /*
  34:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * A sample implementation of pvPortMalloc() and vPortFree() that permits
  35:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * allocated blocks to be freed, but does not combine adjacent free blocks
  36:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * into a single larger block.
  37:FreeRTOS/Source/portable/MemMang/heap_2.c ****  *
  38:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * See heap_1.c and heap_3.c for alternative implementations, and the memory
  39:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * management pages of http://www.FreeRTOS.org for more information.
  40:FreeRTOS/Source/portable/MemMang/heap_2.c ****  */
  41:FreeRTOS/Source/portable/MemMang/heap_2.c **** #include <stdlib.h>
  42:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  43:FreeRTOS/Source/portable/MemMang/heap_2.c **** #include "FreeRTOS.h"
  44:FreeRTOS/Source/portable/MemMang/heap_2.c **** #include "task.h"
  45:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  46:FreeRTOS/Source/portable/MemMang/heap_2.c **** /* Setup the correct byte alignment mask for the defined byte alignment. */
  47:FreeRTOS/Source/portable/MemMang/heap_2.c **** #if portBYTE_ALIGNMENT == 4
  48:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	#define heapBYTE_ALIGNMENT_MASK	( ( size_t ) 0x0003 )
  49:FreeRTOS/Source/portable/MemMang/heap_2.c **** #endif
  50:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  51:FreeRTOS/Source/portable/MemMang/heap_2.c **** #if portBYTE_ALIGNMENT == 2
  52:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	#define heapBYTE_ALIGNMENT_MASK	( ( size_t ) 0x0001 )
  53:FreeRTOS/Source/portable/MemMang/heap_2.c **** #endif
  54:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  55:FreeRTOS/Source/portable/MemMang/heap_2.c **** #if portBYTE_ALIGNMENT == 1
  56:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	#define heapBYTE_ALIGNMENT_MASK	( ( size_t ) 0x0000 )
  57:FreeRTOS/Source/portable/MemMang/heap_2.c **** #endif
  58:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  59:FreeRTOS/Source/portable/MemMang/heap_2.c **** #ifndef heapBYTE_ALIGNMENT_MASK
  60:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	#error "Invalid portBYTE_ALIGNMENT definition"
  61:FreeRTOS/Source/portable/MemMang/heap_2.c **** #endif
  62:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  63:FreeRTOS/Source/portable/MemMang/heap_2.c **** /* Allocate the memory for the heap.  The struct is used to force byte
  64:FreeRTOS/Source/portable/MemMang/heap_2.c **** alignment without using any non-portable code. */
  65:FreeRTOS/Source/portable/MemMang/heap_2.c **** static struct xRTOS_HEAP
  66:FreeRTOS/Source/portable/MemMang/heap_2.c **** {
  67:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	unsigned portLONG ulDummy;
  68:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	unsigned portCHAR ucHeap[ configTOTAL_HEAP_SIZE ];
  69:FreeRTOS/Source/portable/MemMang/heap_2.c **** } xHeap;
  70:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  71:FreeRTOS/Source/portable/MemMang/heap_2.c **** /* Define the linked list structure.  This is used to link free blocks in order
  72:FreeRTOS/Source/portable/MemMang/heap_2.c **** of their size. */
  73:FreeRTOS/Source/portable/MemMang/heap_2.c **** typedef struct A_BLOCK_LINK
  74:FreeRTOS/Source/portable/MemMang/heap_2.c **** {
  75:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	struct A_BLOCK_LINK *pxNextFreeBlock;	/*<< The next free block in the list. */
  76:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	size_t xBlockSize;						/*<< The size of the free block. */
  77:FreeRTOS/Source/portable/MemMang/heap_2.c **** } xBlockLink;
  78:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  79:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  80:FreeRTOS/Source/portable/MemMang/heap_2.c **** static const unsigned portSHORT  heapSTRUCT_SIZE	= ( sizeof( xBlockLink ) + ( sizeof( xBlockLink ) 
  81:FreeRTOS/Source/portable/MemMang/heap_2.c **** #define heapMINIMUM_BLOCK_SIZE	( ( size_t ) ( heapSTRUCT_SIZE * 2 ) )
  82:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  83:FreeRTOS/Source/portable/MemMang/heap_2.c **** /* Create a couple of list links to mark the start and end of the list. */
  84:FreeRTOS/Source/portable/MemMang/heap_2.c **** static xBlockLink xStart, xEnd;
  85:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  86:FreeRTOS/Source/portable/MemMang/heap_2.c **** /* STATIC FUNCTIONS ARE DEFINED AS MACROS TO MINIMIZE THE FUNCTION CALL DEPTH. */
  87:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
  88:FreeRTOS/Source/portable/MemMang/heap_2.c **** /*
  89:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * Insert a block into the list of free blocks - which is ordered by size of
  90:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * the block.  Small blocks at the start of the list and large blocks at the end
  91:FreeRTOS/Source/portable/MemMang/heap_2.c ****  * of the list.
  92:FreeRTOS/Source/portable/MemMang/heap_2.c ****  */
  93:FreeRTOS/Source/portable/MemMang/heap_2.c **** #define prvInsertBlockIntoFreeList( pxBlockToInsert )								\
  94:FreeRTOS/Source/portable/MemMang/heap_2.c **** {																					\
  95:FreeRTOS/Source/portable/MemMang/heap_2.c **** xBlockLink *pxIterator;																\
  96:FreeRTOS/Source/portable/MemMang/heap_2.c **** size_t xBlockSize;																	\
  97:FreeRTOS/Source/portable/MemMang/heap_2.c **** 																					\
  98:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	xBlockSize = pxBlockToInsert->xBlockSize;										\
  99:FreeRTOS/Source/portable/MemMang/heap_2.c **** 																					\
 100:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* Iterate through the list until a block is found that has a larger size */	\
 101:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* than the block we are inserting. */											\
 102:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	for( pxIterator = &xStart; pxIterator->pxNextFreeBlock->xBlockSize < xBlockSize; pxIterator = pxIt
 103:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	{																				\
 104:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		/* There is nothing to do here - just iterate to the correct position. */	\
 105:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	}																				\
 106:FreeRTOS/Source/portable/MemMang/heap_2.c **** 																					\
 107:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* Update the list to include the block being inserted in the correct */		\
 108:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* position. */																	\
 109:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;					\
 110:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	pxIterator->pxNextFreeBlock = pxBlockToInsert;									\
 111:FreeRTOS/Source/portable/MemMang/heap_2.c **** }
 112:FreeRTOS/Source/portable/MemMang/heap_2.c **** /*-----------------------------------------------------------*/
 113:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 114:FreeRTOS/Source/portable/MemMang/heap_2.c **** #define prvHeapInit()																\
 115:FreeRTOS/Source/portable/MemMang/heap_2.c **** {																					\
 116:FreeRTOS/Source/portable/MemMang/heap_2.c **** xBlockLink *pxFirstFreeBlock;														\
 117:FreeRTOS/Source/portable/MemMang/heap_2.c **** 																					\
 118:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* xStart is used to hold a pointer to the first item in the list of free */	\
 119:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* blocks.  The void cast is used to prevent compiler warnings. */				\
 120:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	xStart.pxNextFreeBlock = ( void * ) xHeap.ucHeap;								\
 121:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	xStart.xBlockSize = ( size_t ) 0;												\
 122:FreeRTOS/Source/portable/MemMang/heap_2.c **** 																					\
 123:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* xEnd is used to mark the end of the list of free blocks. */					\
 124:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	xEnd.xBlockSize = configTOTAL_HEAP_SIZE;										\
 125:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	xEnd.pxNextFreeBlock = NULL;													\
 126:FreeRTOS/Source/portable/MemMang/heap_2.c **** 																					\
 127:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	/* To start with there is a single free block that is sized to take up the		\
 128:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	entire heap space. */															\
 129:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	pxFirstFreeBlock = ( void * ) xHeap.ucHeap;										\
 130:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	pxFirstFreeBlock->xBlockSize = configTOTAL_HEAP_SIZE;							\
 131:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	pxFirstFreeBlock->pxNextFreeBlock = &xEnd;										\
 132:FreeRTOS/Source/portable/MemMang/heap_2.c **** }
 133:FreeRTOS/Source/portable/MemMang/heap_2.c **** /*-----------------------------------------------------------*/
 134:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 135:FreeRTOS/Source/portable/MemMang/heap_2.c **** void *pvPortMalloc( size_t xWantedSize )
 136:FreeRTOS/Source/portable/MemMang/heap_2.c **** {
 137:FreeRTOS/Source/portable/MemMang/heap_2.c **** xBlockLink *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
 138:FreeRTOS/Source/portable/MemMang/heap_2.c **** static portBASE_TYPE xHeapHasBeenInitialised = pdFALSE;
 139:FreeRTOS/Source/portable/MemMang/heap_2.c **** void *pvReturn = NULL;
 140:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 141:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	vTaskSuspendAll();
 142:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	{
 143:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		/* If this is the first call to malloc then the heap will require
 144:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		initialisation to setup the list of free blocks. */
 145:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		if( xHeapHasBeenInitialised == pdFALSE )
 146:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		{
 147:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			prvHeapInit();
 148:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			xHeapHasBeenInitialised = pdTRUE;
 149:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		}
 150:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 151:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		/* The wanted size is increased so it can contain a xBlockLink
 152:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		structure in addition to the requested amount of bytes. */
 153:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		if( xWantedSize > 0 )
 154:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		{
 155:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			xWantedSize += heapSTRUCT_SIZE;
 156:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 157:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			/* Ensure that blocks are always aligned to the required number of bytes. */
 158:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			if( xWantedSize & heapBYTE_ALIGNMENT_MASK )
 159:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			{
 160:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				/* Byte alignment required. */
 161:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & heapBYTE_ALIGNMENT_MASK ) );
 162:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			}
 163:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		}
 164:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 165:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		if( ( xWantedSize > 0 ) && ( xWantedSize < configTOTAL_HEAP_SIZE ) )
 166:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		{
 167:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			/* Blocks are stored in byte order - traverse the list from the start
 168:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			(smallest) block until one of adequate size is found. */
 169:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			pxPreviousBlock = &xStart;
 170:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			pxBlock = xStart.pxNextFreeBlock;
 171:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock ) )
 172:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			{
 173:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				pxPreviousBlock = pxBlock;
 174:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				pxBlock = pxBlock->pxNextFreeBlock;
 175:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			}
 176:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 177:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			/* If we found the end marker then a block of adequate size was not found. */
 178:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			if( pxBlock != &xEnd )
 179:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			{
 180:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				/* Return the memory space - jumping over the xBlockLink structure
 181:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				at its start. */
 182:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				pvReturn = ( void * ) ( ( ( unsigned portCHAR * ) pxPreviousBlock->pxNextFreeBlock ) + heapSTRU
 183:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 184:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				/* This block is being returned for use so must be taken our of the
 185:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				list of free blocks. */
 186:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
 187:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 188:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				/* If the block is larger than required it can be split into two. */
 189:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
 190:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				{
 191:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					/* This block is to be split into two.  Create a new block
 192:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					following the number of bytes requested. The void cast is
 193:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					used to prevent byte alignment warnings from the compiler. */
 194:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					pxNewBlockLink = ( void * ) ( ( ( unsigned portCHAR * ) pxBlock ) + xWantedSize );
 195:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					
 196:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					/* Calculate the sizes of two blocks split from the single
 197:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					block. */
 198:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;	
 199:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					pxBlock->xBlockSize = xWantedSize;			
 200:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					
 201:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					/* Insert the new block into the list of free blocks. */
 202:FreeRTOS/Source/portable/MemMang/heap_2.c **** 					prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
 203:FreeRTOS/Source/portable/MemMang/heap_2.c **** 				}
 204:FreeRTOS/Source/portable/MemMang/heap_2.c **** 			}
 205:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		}
 206:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	}
 207:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	xTaskResumeAll();
 208:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 209:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	return pvReturn;
 210:FreeRTOS/Source/portable/MemMang/heap_2.c **** }
 211:FreeRTOS/Source/portable/MemMang/heap_2.c **** /*-----------------------------------------------------------*/
 212:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 213:FreeRTOS/Source/portable/MemMang/heap_2.c **** void vPortFree( void *pv )
 214:FreeRTOS/Source/portable/MemMang/heap_2.c **** {
  19              	h	{r4, lr}
  20 0000 10B5     	.LCFI0:
  21              	.LVL0:
  22              		.loc 1 218 0
 215:FreeRTOS/Source/portable/MemMang/heap_2.c **** unsigned portCHAR *puc = ( unsigned portCHAR * ) pv;
 216:FreeRTOS/Source/portable/MemMang/heap_2.c **** xBlockLink *pxLink;
 217:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 218:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	if( pv )
  23              		r0, #0
  24 0002 0028     		beq	.L7
  25 0004 0FD0     		.loc 1 225 0
 219:FreeRTOS/Source/portable/MemMang/heap_2.c **** 	{
 220:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		/* The memory being freed will have an xBlockLink structure immediately
 221:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		before it. */
 222:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		puc -= heapSTRUCT_SIZE;
 223:FreeRTOS/Source/portable/MemMang/heap_2.c **** 
 224:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		/* This casting is to keep the compiler from issuing warnings. */
 225:FreeRTOS/Source/portable/MemMang/heap_2.c **** 		pxLink = ( void * ) puc;
  26              	v	r4, r0
  27 0006 041C     	.LVL1:
  28              		sub	r4, r4, #8

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -