123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879 |
- Marking local functions: prvInsertBlockIntoFreeList prvHeapInit vPortRaiseBASEPRI
- Marking externally visible functions: vPortGetHeapStats vPortInitialiseBlocks xPortGetMinimumEverFreeHeapSize xPortGetFreeHeapSize vPortFree pvPortMalloc
- Marking externally visible variables:
- Reclaiming functions:
- Reclaiming variables:
- Clearing address taken flags:
- Symbol table:
- vPortExitCritical/24 (vPortExitCritical) @06ad4e00
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags: optimize_size
- Called by: vPortGetHeapStats/20
- Calls:
- vPortEnterCritical/23 (vPortEnterCritical) @06ad4c40
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags: optimize_size
- Called by: vPortGetHeapStats/20
- Calls:
- xTaskResumeAll/22 (xTaskResumeAll) @06ad42a0
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags: optimize_size
- Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13
- Calls:
- vTaskSuspendAll/21 (vTaskSuspendAll) @06ad40e0
- Type: function
- Visibility: external public
- References:
- Referring:
- Availability: not_available
- Function flags: optimize_size
- Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13
- Calls:
- vPortGetHeapStats/20 (vPortGetHeapStats) @06ac60e0
- Type: function definition analyzed
- Visibility: externally_visible public
- References: xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulFrees/11 (read)xMinimumEverFreeBytesRemaining/9 (read)
- Referring:
- Availability: available
- Function flags: body optimize_size
- Called by:
- Calls: vPortExitCritical/24 vPortEnterCritical/23 xTaskResumeAll/22 vTaskSuspendAll/21
- prvInsertBlockIntoFreeList/19 (prvInsertBlockIntoFreeList) @06ac6d20
- Type: function definition analyzed
- Visibility: prevailing_def_ironly
- References: xStart/6 (addr)pxEnd/7 (read)pxEnd/7 (read)
- Referring:
- Availability: local
- Function flags: body local optimize_size
- Called by: vPortFree/14 pvPortMalloc/13
- Calls:
- prvHeapInit/18 (prvHeapInit) @06ac6a80
- Type: function definition analyzed
- Visibility: prevailing_def_ironly
- References: ucHeap/4 (addr)ucHeap/4 (addr)xStart/6 (write)xStart/6 (write)pxEnd/7 (write)pxEnd/7 (read)pxEnd/7 (read)pxEnd/7 (read)xMinimumEverFreeBytesRemaining/9 (write)xFreeBytesRemaining/8 (write)xBlockAllocatedBit/12 (write)
- Referring:
- Availability: local
- Function flags: body local optimize_size
- Called by: pvPortMalloc/13
- Calls:
- vPortInitialiseBlocks/17 (vPortInitialiseBlocks) @06ac67e0
- Type: function definition analyzed
- Visibility: externally_visible public
- References:
- Referring:
- Availability: available
- Function flags: body optimize_size
- Called by:
- Calls:
- xPortGetMinimumEverFreeHeapSize/16 (xPortGetMinimumEverFreeHeapSize) @06ac6540
- Type: function definition analyzed
- Visibility: externally_visible public
- References: xMinimumEverFreeBytesRemaining/9 (read)
- Referring:
- Availability: available
- Function flags: body optimize_size
- Called by:
- Calls:
- xPortGetFreeHeapSize/15 (xPortGetFreeHeapSize) @06ac62a0
- Type: function definition analyzed
- Visibility: externally_visible public
- References: xFreeBytesRemaining/8 (read)
- Referring:
- Availability: available
- Function flags: body optimize_size
- Called by:
- Calls:
- vPortFree/14 (vPortFree) @06ac6000
- Type: function definition analyzed
- Visibility: externally_visible public
- References: xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xNumberOfSuccessfulFrees/11 (read)xNumberOfSuccessfulFrees/11 (write)
- Referring:
- Availability: available
- Function flags: body optimize_size
- Called by:
- Calls: xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 vTaskSuspendAll/21 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1
- pvPortMalloc/13 (pvPortMalloc) @06abeee0
- Type: function definition analyzed
- Visibility: externally_visible public
- References: pxEnd/7 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xStart/6 (addr)xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xFreeBytesRemaining/8 (read)xMinimumEverFreeBytesRemaining/9 (read)xFreeBytesRemaining/8 (read)xMinimumEverFreeBytesRemaining/9 (write)xBlockAllocatedBit/12 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulAllocations/10 (write)
- Referring:
- Availability: available
- Function flags: body optimize_size
- Called by:
- Calls: vPortRaiseBASEPRI/1 xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 vPortRaiseBASEPRI/1 vPortRaiseBASEPRI/1 prvHeapInit/18 vTaskSuspendAll/21
- xBlockAllocatedBit/12 (xBlockAllocatedBit) @06b14678
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)vPortFree/14 (read)vPortFree/14 (read)vPortFree/14 (read)
- Availability: available
- Varpool flags: initialized
- xNumberOfSuccessfulFrees/11 (xNumberOfSuccessfulFrees) @06b145e8
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: vPortFree/14 (read)vPortFree/14 (write)vPortGetHeapStats/20 (read)
- Availability: available
- Varpool flags: initialized
- xNumberOfSuccessfulAllocations/10 (xNumberOfSuccessfulAllocations) @06b145a0
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (write)vPortGetHeapStats/20 (read)
- Availability: available
- Varpool flags: initialized
- xMinimumEverFreeBytesRemaining/9 (xMinimumEverFreeBytesRemaining) @06b14558
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (write)prvHeapInit/18 (write)xPortGetMinimumEverFreeHeapSize/16 (read)vPortGetHeapStats/20 (read)
- Availability: available
- Varpool flags: initialized
- xFreeBytesRemaining/8 (xFreeBytesRemaining) @06b14510
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)pvPortMalloc/13 (write)pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)vPortFree/14 (read)vPortFree/14 (write)xPortGetFreeHeapSize/15 (read)vPortGetHeapStats/20 (read)
- Availability: available
- Varpool flags: initialized
- pxEnd/7 (pxEnd) @06b14480
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)prvHeapInit/18 (read)prvHeapInit/18 (read)prvHeapInit/18 (read)prvInsertBlockIntoFreeList/19 (read)prvInsertBlockIntoFreeList/19 (read)vPortGetHeapStats/20 (read)
- Availability: available
- Varpool flags: initialized
- xStart/6 (xStart) @06b143f0
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: pvPortMalloc/13 (addr)pvPortMalloc/13 (read)prvHeapInit/18 (write)prvHeapInit/18 (write)prvInsertBlockIntoFreeList/19 (addr)vPortGetHeapStats/20 (read)
- Availability: available
- Varpool flags:
- ucHeap/4 (ucHeap) @06b14120
- Type: variable definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring: prvHeapInit/18 (addr)prvHeapInit/18 (addr)
- Availability: available
- Varpool flags:
- vPortRaiseBASEPRI/1 (vPortRaiseBASEPRI) @06a5bd20
- Type: function definition analyzed
- Visibility: prevailing_def_ironly
- References:
- Referring:
- Availability: local
- Function flags: body local optimize_size
- Called by: vPortFree/14 vPortFree/14 pvPortMalloc/13 pvPortMalloc/13 pvPortMalloc/13
- Calls:
- vPortGetHeapStats (struct HeapStats_t * pxHeapStats)
- {
- size_t xMinSize;
- size_t xMaxSize;
- size_t xBlocks;
- struct BlockLink_t * pxBlock;
- <bb 2> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- xBlocks = 0;
- xMaxSize = 0;
- xMinSize = 4294967295;
- # DEBUG BEGIN_STMT
- vTaskSuspendAll ();
- # DEBUG BEGIN_STMT
- pxBlock = xStart.pxNextFreeBlock;
- # DEBUG BEGIN_STMT
- if (pxBlock != 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 3> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- xBlocks = xBlocks + 1;
- # DEBUG BEGIN_STMT
- _1 = pxBlock->xBlockSize;
- if (xMaxSize < _1)
- goto <bb 4>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 4> :
- # DEBUG BEGIN_STMT
- xMaxSize = pxBlock->xBlockSize;
- <bb 5> :
- # DEBUG BEGIN_STMT
- _2 = pxBlock->xBlockSize;
- if (xMinSize > _2)
- goto <bb 6>; [INV]
- else
- goto <bb 7>; [INV]
- <bb 6> :
- # DEBUG BEGIN_STMT
- xMinSize = pxBlock->xBlockSize;
- <bb 7> :
- # DEBUG BEGIN_STMT
- pxBlock = pxBlock->pxNextFreeBlock;
- # DEBUG BEGIN_STMT
- pxEnd.26_3 = pxEnd;
- if (pxBlock != pxEnd.26_3)
- goto <bb 3>; [INV]
- else
- goto <bb 8>; [INV]
- <bb 8> :
- # DEBUG BEGIN_STMT
- xTaskResumeAll ();
- # DEBUG BEGIN_STMT
- pxHeapStats->xSizeOfLargestFreeBlockInBytes = xMaxSize;
- # DEBUG BEGIN_STMT
- pxHeapStats->xSizeOfSmallestFreeBlockInBytes = xMinSize;
- # DEBUG BEGIN_STMT
- pxHeapStats->xNumberOfFreeBlocks = xBlocks;
- # DEBUG BEGIN_STMT
- vPortEnterCritical ();
- # DEBUG BEGIN_STMT
- xFreeBytesRemaining.27_4 = xFreeBytesRemaining;
- pxHeapStats->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.27_4;
- # DEBUG BEGIN_STMT
- xNumberOfSuccessfulAllocations.28_5 = xNumberOfSuccessfulAllocations;
- pxHeapStats->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.28_5;
- # DEBUG BEGIN_STMT
- xNumberOfSuccessfulFrees.29_6 = xNumberOfSuccessfulFrees;
- pxHeapStats->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.29_6;
- # DEBUG BEGIN_STMT
- xMinimumEverFreeBytesRemaining.30_7 = xMinimumEverFreeBytesRemaining;
- pxHeapStats->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.30_7;
- # DEBUG BEGIN_STMT
- vPortExitCritical ();
- return;
- }
- prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert)
- {
- uint8_t * puc;
- struct BlockLink_t * pxIterator;
- <bb 2> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- pxIterator = &xStart;
- goto <bb 4>; [INV]
- <bb 3> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- pxIterator = pxIterator->pxNextFreeBlock;
- <bb 4> :
- # DEBUG BEGIN_STMT
- _1 = pxIterator->pxNextFreeBlock;
- if (pxBlockToInsert > _1)
- goto <bb 3>; [INV]
- else
- goto <bb 5>; [INV]
- <bb 5> :
- # DEBUG BEGIN_STMT
- puc = pxIterator;
- # DEBUG BEGIN_STMT
- _2 = pxIterator->xBlockSize;
- _3 = puc + _2;
- if (pxBlockToInsert == _3)
- goto <bb 6>; [INV]
- else
- goto <bb 7>; [INV]
- <bb 6> :
- # DEBUG BEGIN_STMT
- _4 = pxIterator->xBlockSize;
- _5 = pxBlockToInsert->xBlockSize;
- _6 = _4 + _5;
- pxIterator->xBlockSize = _6;
- # DEBUG BEGIN_STMT
- pxBlockToInsert = pxIterator;
- <bb 7> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- puc = pxBlockToInsert;
- # DEBUG BEGIN_STMT
- _7 = pxBlockToInsert->xBlockSize;
- _8 = puc + _7;
- _9 = pxIterator->pxNextFreeBlock;
- if (_8 == _9)
- goto <bb 8>; [INV]
- else
- goto <bb 11>; [INV]
- <bb 8> :
- # DEBUG BEGIN_STMT
- _10 = pxIterator->pxNextFreeBlock;
- pxEnd.19_11 = pxEnd;
- if (_10 != pxEnd.19_11)
- goto <bb 9>; [INV]
- else
- goto <bb 10>; [INV]
- <bb 9> :
- # DEBUG BEGIN_STMT
- _12 = pxBlockToInsert->xBlockSize;
- _13 = pxIterator->pxNextFreeBlock;
- _14 = _13->xBlockSize;
- _15 = _12 + _14;
- pxBlockToInsert->xBlockSize = _15;
- # DEBUG BEGIN_STMT
- _16 = pxIterator->pxNextFreeBlock;
- _17 = _16->pxNextFreeBlock;
- pxBlockToInsert->pxNextFreeBlock = _17;
- goto <bb 12>; [INV]
- <bb 10> :
- # DEBUG BEGIN_STMT
- pxEnd.20_18 = pxEnd;
- pxBlockToInsert->pxNextFreeBlock = pxEnd.20_18;
- goto <bb 12>; [INV]
- <bb 11> :
- # DEBUG BEGIN_STMT
- _19 = pxIterator->pxNextFreeBlock;
- pxBlockToInsert->pxNextFreeBlock = _19;
- <bb 12> :
- # DEBUG BEGIN_STMT
- if (pxIterator != pxBlockToInsert)
- goto <bb 13>; [INV]
- else
- goto <bb 14>; [INV]
- <bb 13> :
- # DEBUG BEGIN_STMT
- pxIterator->pxNextFreeBlock = pxBlockToInsert;
- <bb 14> :
- # DEBUG BEGIN_STMT
- return;
- }
- prvHeapInit ()
- {
- size_t xTotalHeapSize;
- size_t uxAddress;
- uint8_t * pucAlignedHeap;
- struct BlockLink_t * pxFirstFreeBlock;
- <bb 2> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- xTotalHeapSize = 8192;
- # DEBUG BEGIN_STMT
- uxAddress = (size_t) &ucHeap;
- # DEBUG BEGIN_STMT
- _1 = uxAddress & 7;
- if (_1 != 0)
- goto <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- # DEBUG BEGIN_STMT
- uxAddress = uxAddress + 7;
- # DEBUG BEGIN_STMT
- uxAddress = uxAddress & 4294967288;
- # DEBUG BEGIN_STMT
- _2 = xTotalHeapSize - uxAddress;
- ucHeap.12_3 = (unsigned int) &ucHeap;
- xTotalHeapSize = _2 + ucHeap.12_3;
- <bb 4> :
- # DEBUG BEGIN_STMT
- pucAlignedHeap = (uint8_t *) uxAddress;
- # DEBUG BEGIN_STMT
- xStart.pxNextFreeBlock = pucAlignedHeap;
- # DEBUG BEGIN_STMT
- xStart.xBlockSize = 0;
- # DEBUG BEGIN_STMT
- pucAlignedHeap.13_4 = (unsigned int) pucAlignedHeap;
- uxAddress = xTotalHeapSize + pucAlignedHeap.13_4;
- # DEBUG BEGIN_STMT
- uxAddress = uxAddress + 4294967288;
- # DEBUG BEGIN_STMT
- uxAddress = uxAddress & 4294967288;
- # DEBUG BEGIN_STMT
- uxAddress.14_5 = (struct BlockLink_t *) uxAddress;
- pxEnd = uxAddress.14_5;
- # DEBUG BEGIN_STMT
- pxEnd.15_6 = pxEnd;
- pxEnd.15_6->xBlockSize = 0;
- # DEBUG BEGIN_STMT
- pxEnd.16_7 = pxEnd;
- pxEnd.16_7->pxNextFreeBlock = 0B;
- # DEBUG BEGIN_STMT
- pxFirstFreeBlock = pucAlignedHeap;
- # DEBUG BEGIN_STMT
- pxFirstFreeBlock.17_8 = (unsigned int) pxFirstFreeBlock;
- _9 = uxAddress - pxFirstFreeBlock.17_8;
- pxFirstFreeBlock->xBlockSize = _9;
- # DEBUG BEGIN_STMT
- pxEnd.18_10 = pxEnd;
- pxFirstFreeBlock->pxNextFreeBlock = pxEnd.18_10;
- # DEBUG BEGIN_STMT
- _11 = pxFirstFreeBlock->xBlockSize;
- xMinimumEverFreeBytesRemaining = _11;
- # DEBUG BEGIN_STMT
- _12 = pxFirstFreeBlock->xBlockSize;
- xFreeBytesRemaining = _12;
- # DEBUG BEGIN_STMT
- xBlockAllocatedBit = 2147483648;
- return;
- }
- vPortInitialiseBlocks ()
- {
- <bb 2> :
- # DEBUG BEGIN_STMT
- return;
- }
- xPortGetMinimumEverFreeHeapSize ()
- {
- size_t D.6351;
- <bb 2> :
- # DEBUG BEGIN_STMT
- D.6351 = xMinimumEverFreeBytesRemaining;
- return D.6351;
- }
- xPortGetFreeHeapSize ()
- {
- size_t D.6349;
- <bb 2> :
- # DEBUG BEGIN_STMT
- D.6349 = xFreeBytesRemaining;
- return D.6349;
- }
- vPortFree (void * pv)
- {
- struct BlockLink_t * pxLink;
- uint8_t * puc;
- <bb 2> :
- # DEBUG BEGIN_STMT
- puc = pv;
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- if (pv != 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 12>; [INV]
- <bb 3> :
- # DEBUG BEGIN_STMT
- puc = puc + 4294967288;
- # DEBUG BEGIN_STMT
- pxLink = puc;
- # DEBUG BEGIN_STMT
- _1 = pxLink->xBlockSize;
- xBlockAllocatedBit.21_2 = xBlockAllocatedBit;
- _3 = _1 & xBlockAllocatedBit.21_2;
- if (_3 == 0)
- goto <bb 4>; [INV]
- else
- goto <bb 6>; [INV]
- <bb 4> :
- # DEBUG BEGIN_STMT
- vPortRaiseBASEPRI ();
- <bb 5> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- goto <bb 5>; [INV]
- <bb 6> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- _4 = pxLink->pxNextFreeBlock;
- if (_4 != 0B)
- goto <bb 7>; [INV]
- else
- goto <bb 9>; [INV]
- <bb 7> :
- # DEBUG BEGIN_STMT
- vPortRaiseBASEPRI ();
- <bb 8> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- goto <bb 8>; [INV]
- <bb 9> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- _5 = pxLink->xBlockSize;
- xBlockAllocatedBit.22_6 = xBlockAllocatedBit;
- _7 = _5 & xBlockAllocatedBit.22_6;
- if (_7 != 0)
- goto <bb 10>; [INV]
- else
- goto <bb 12>; [INV]
- <bb 10> :
- # DEBUG BEGIN_STMT
- _8 = pxLink->pxNextFreeBlock;
- if (_8 == 0B)
- goto <bb 11>; [INV]
- else
- goto <bb 12>; [INV]
- <bb 11> :
- # DEBUG BEGIN_STMT
- _9 = pxLink->xBlockSize;
- xBlockAllocatedBit.23_10 = xBlockAllocatedBit;
- _11 = ~xBlockAllocatedBit.23_10;
- _12 = _9 & _11;
- pxLink->xBlockSize = _12;
- # DEBUG BEGIN_STMT
- vTaskSuspendAll ();
- # DEBUG BEGIN_STMT
- _13 = pxLink->xBlockSize;
- xFreeBytesRemaining.24_14 = xFreeBytesRemaining;
- _15 = _13 + xFreeBytesRemaining.24_14;
- xFreeBytesRemaining = _15;
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- prvInsertBlockIntoFreeList (pxLink);
- # DEBUG BEGIN_STMT
- xNumberOfSuccessfulFrees.25_16 = xNumberOfSuccessfulFrees;
- _17 = xNumberOfSuccessfulFrees.25_16 + 1;
- xNumberOfSuccessfulFrees = _17;
- # DEBUG BEGIN_STMT
- xTaskResumeAll ();
- <bb 12> :
- # DEBUG BEGIN_STMT
- return;
- }
- pvPortMalloc (size_t xWantedSize)
- {
- void * pvReturn;
- struct BlockLink_t * pxNewBlockLink;
- struct BlockLink_t * pxPreviousBlock;
- struct BlockLink_t * pxBlock;
- void * D.6321;
- <bb 2> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- pvReturn = 0B;
- # DEBUG BEGIN_STMT
- vTaskSuspendAll ();
- # DEBUG BEGIN_STMT
- pxEnd.0_1 = pxEnd;
- if (pxEnd.0_1 == 0B)
- goto <bb 3>; [INV]
- else
- goto <bb 4>; [INV]
- <bb 3> :
- # DEBUG BEGIN_STMT
- prvHeapInit ();
- <bb 4> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- xBlockAllocatedBit.1_2 = xBlockAllocatedBit;
- _3 = xWantedSize & xBlockAllocatedBit.1_2;
- if (_3 == 0)
- goto <bb 5>; [INV]
- else
- goto <bb 28>; [INV]
- <bb 5> :
- # DEBUG BEGIN_STMT
- _4 = xWantedSize + 4294967295;
- if (_4 <= 4294967286)
- goto <bb 6>; [INV]
- else
- goto <bb 12>; [INV]
- <bb 6> :
- # DEBUG BEGIN_STMT
- xWantedSize = xWantedSize + 8;
- # DEBUG BEGIN_STMT
- _5 = xWantedSize & 7;
- if (_5 != 0)
- goto <bb 7>; [INV]
- else
- goto <bb 13>; [INV]
- <bb 7> :
- # DEBUG BEGIN_STMT
- _6 = xWantedSize & 4294967288;
- _7 = _6 + 8;
- if (xWantedSize < _7)
- goto <bb 8>; [INV]
- else
- goto <bb 11>; [INV]
- <bb 8> :
- # DEBUG BEGIN_STMT
- _8 = xWantedSize & 4294967288;
- xWantedSize = _8 + 8;
- # DEBUG BEGIN_STMT
- _9 = xWantedSize & 7;
- if (_9 != 0)
- goto <bb 9>; [INV]
- else
- goto <bb 13>; [INV]
- <bb 9> :
- # DEBUG BEGIN_STMT
- vPortRaiseBASEPRI ();
- <bb 10> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- goto <bb 10>; [INV]
- <bb 11> :
- # DEBUG BEGIN_STMT
- xWantedSize = 0;
- goto <bb 13>; [INV]
- <bb 12> :
- # DEBUG BEGIN_STMT
- xWantedSize = 0;
- <bb 13> :
- # DEBUG BEGIN_STMT
- if (xWantedSize != 0)
- goto <bb 14>; [INV]
- else
- goto <bb 28>; [INV]
- <bb 14> :
- xFreeBytesRemaining.2_10 = xFreeBytesRemaining;
- if (xWantedSize <= xFreeBytesRemaining.2_10)
- goto <bb 15>; [INV]
- else
- goto <bb 28>; [INV]
- <bb 15> :
- # DEBUG BEGIN_STMT
- pxPreviousBlock = &xStart;
- # DEBUG BEGIN_STMT
- pxBlock = xStart.pxNextFreeBlock;
- # DEBUG BEGIN_STMT
- goto <bb 17>; [INV]
- <bb 16> :
- # DEBUG BEGIN_STMT
- pxPreviousBlock = pxBlock;
- # DEBUG BEGIN_STMT
- pxBlock = pxBlock->pxNextFreeBlock;
- <bb 17> :
- # DEBUG BEGIN_STMT
- _11 = pxBlock->xBlockSize;
- if (xWantedSize > _11)
- goto <bb 18>; [INV]
- else
- goto <bb 19>; [INV]
- <bb 18> :
- _12 = pxBlock->pxNextFreeBlock;
- if (_12 != 0B)
- goto <bb 16>; [INV]
- else
- goto <bb 19>; [INV]
- <bb 19> :
- # DEBUG BEGIN_STMT
- pxEnd.3_13 = pxEnd;
- if (pxBlock != pxEnd.3_13)
- goto <bb 20>; [INV]
- else
- goto <bb 28>; [INV]
- <bb 20> :
- # DEBUG BEGIN_STMT
- _14 = pxPreviousBlock->pxNextFreeBlock;
- pvReturn = _14 + 8;
- # DEBUG BEGIN_STMT
- _15 = pxBlock->pxNextFreeBlock;
- pxPreviousBlock->pxNextFreeBlock = _15;
- # DEBUG BEGIN_STMT
- _16 = pxBlock->xBlockSize;
- _17 = _16 - xWantedSize;
- if (_17 > 16)
- goto <bb 21>; [INV]
- else
- goto <bb 25>; [INV]
- <bb 21> :
- # DEBUG BEGIN_STMT
- pxNewBlockLink = pxBlock + xWantedSize;
- # DEBUG BEGIN_STMT
- pxNewBlockLink.4_18 = (unsigned int) pxNewBlockLink;
- _19 = pxNewBlockLink.4_18 & 7;
- if (_19 != 0)
- goto <bb 22>; [INV]
- else
- goto <bb 24>; [INV]
- <bb 22> :
- # DEBUG BEGIN_STMT
- vPortRaiseBASEPRI ();
- <bb 23> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- goto <bb 23>; [INV]
- <bb 24> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- _20 = pxBlock->xBlockSize;
- _21 = _20 - xWantedSize;
- pxNewBlockLink->xBlockSize = _21;
- # DEBUG BEGIN_STMT
- pxBlock->xBlockSize = xWantedSize;
- # DEBUG BEGIN_STMT
- prvInsertBlockIntoFreeList (pxNewBlockLink);
- <bb 25> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- xFreeBytesRemaining.5_22 = xFreeBytesRemaining;
- _23 = pxBlock->xBlockSize;
- _24 = xFreeBytesRemaining.5_22 - _23;
- xFreeBytesRemaining = _24;
- # DEBUG BEGIN_STMT
- xFreeBytesRemaining.6_25 = xFreeBytesRemaining;
- xMinimumEverFreeBytesRemaining.7_26 = xMinimumEverFreeBytesRemaining;
- if (xFreeBytesRemaining.6_25 < xMinimumEverFreeBytesRemaining.7_26)
- goto <bb 26>; [INV]
- else
- goto <bb 27>; [INV]
- <bb 26> :
- # DEBUG BEGIN_STMT
- xFreeBytesRemaining.8_27 = xFreeBytesRemaining;
- xMinimumEverFreeBytesRemaining = xFreeBytesRemaining.8_27;
- <bb 27> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- _28 = pxBlock->xBlockSize;
- xBlockAllocatedBit.9_29 = xBlockAllocatedBit;
- _30 = _28 | xBlockAllocatedBit.9_29;
- pxBlock->xBlockSize = _30;
- # DEBUG BEGIN_STMT
- pxBlock->pxNextFreeBlock = 0B;
- # DEBUG BEGIN_STMT
- xNumberOfSuccessfulAllocations.10_31 = xNumberOfSuccessfulAllocations;
- _32 = xNumberOfSuccessfulAllocations.10_31 + 1;
- xNumberOfSuccessfulAllocations = _32;
- <bb 28> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- xTaskResumeAll ();
- # DEBUG BEGIN_STMT
- pvReturn.11_33 = (unsigned int) pvReturn;
- _34 = pvReturn.11_33 & 7;
- if (_34 != 0)
- goto <bb 29>; [INV]
- else
- goto <bb 31>; [INV]
- <bb 29> :
- # DEBUG BEGIN_STMT
- vPortRaiseBASEPRI ();
- <bb 30> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- goto <bb 30>; [INV]
- <bb 31> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- D.6321 = pvReturn;
- return D.6321;
- }
- __attribute__((always_inline))
- vPortRaiseBASEPRI ()
- {
- uint32_t ulNewBASEPRI;
- <bb 2> :
- # DEBUG BEGIN_STMT
- # DEBUG BEGIN_STMT
- __asm__ __volatile__(" mov %0, %1
- msr basepri, %0
- isb
- dsb
- " : "=r" ulNewBASEPRI : "i" 16 : "memory");
- return;
- }
|