heap_4.c.048i.remove_symbols 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872
  1. Reclaiming functions:
  2. Reclaiming variables:
  3. Clearing address taken flags:
  4. Symbol table:
  5. vPortExitCritical/24 (vPortExitCritical) @06becee0
  6. Type: function
  7. Visibility: external public
  8. References:
  9. Referring:
  10. Availability: not_available
  11. Function flags:
  12. Called by: vPortGetHeapStats/20
  13. Calls:
  14. vPortEnterCritical/23 (vPortEnterCritical) @06becd20
  15. Type: function
  16. Visibility: external public
  17. References:
  18. Referring:
  19. Availability: not_available
  20. Function flags:
  21. Called by: vPortGetHeapStats/20
  22. Calls:
  23. xTaskResumeAll/22 (xTaskResumeAll) @06bec380
  24. Type: function
  25. Visibility: external public
  26. References:
  27. Referring:
  28. Availability: not_available
  29. Function flags:
  30. Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13
  31. Calls:
  32. vTaskSuspendAll/21 (vTaskSuspendAll) @06bec1c0
  33. Type: function
  34. Visibility: external public
  35. References:
  36. Referring:
  37. Availability: not_available
  38. Function flags:
  39. Called by: vPortGetHeapStats/20 vPortFree/14 pvPortMalloc/13
  40. Calls:
  41. vPortGetHeapStats/20 (vPortGetHeapStats) @06bdd2a0
  42. Type: function definition analyzed
  43. Visibility: force_output externally_visible no_reorder public
  44. References: xStart/6 (read)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulFrees/11 (read)xMinimumEverFreeBytesRemaining/9 (read)
  45. Referring:
  46. Availability: available
  47. Function flags: body
  48. Called by:
  49. Calls: vPortExitCritical/24 vPortEnterCritical/23 xTaskResumeAll/22 vTaskSuspendAll/21
  50. prvInsertBlockIntoFreeList/19 (prvInsertBlockIntoFreeList) @06bddee0
  51. Type: function definition analyzed
  52. Visibility: force_output no_reorder prevailing_def_ironly
  53. References: xStart/6 (addr)pxEnd/7 (read)pxEnd/7 (read)
  54. Referring:
  55. Availability: available
  56. Function flags: body
  57. Called by: vPortFree/14 pvPortMalloc/13
  58. Calls:
  59. prvHeapInit/18 (prvHeapInit) @06bddc40
  60. Type: function definition analyzed
  61. Visibility: force_output no_reorder prevailing_def_ironly
  62. 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)
  63. Referring:
  64. Availability: available
  65. Function flags: body
  66. Called by: pvPortMalloc/13
  67. Calls:
  68. vPortInitialiseBlocks/17 (vPortInitialiseBlocks) @06bdd9a0
  69. Type: function definition analyzed
  70. Visibility: force_output externally_visible no_reorder public
  71. References:
  72. Referring:
  73. Availability: available
  74. Function flags: body
  75. Called by:
  76. Calls:
  77. xPortGetMinimumEverFreeHeapSize/16 (xPortGetMinimumEverFreeHeapSize) @06bdd700
  78. Type: function definition analyzed
  79. Visibility: force_output externally_visible no_reorder public
  80. References: xMinimumEverFreeBytesRemaining/9 (read)
  81. Referring:
  82. Availability: available
  83. Function flags: body
  84. Called by:
  85. Calls:
  86. xPortGetFreeHeapSize/15 (xPortGetFreeHeapSize) @06bdd460
  87. Type: function definition analyzed
  88. Visibility: force_output externally_visible no_reorder public
  89. References: xFreeBytesRemaining/8 (read)
  90. Referring:
  91. Availability: available
  92. Function flags: body
  93. Called by:
  94. Calls:
  95. vPortFree/14 (vPortFree) @06bdd1c0
  96. Type: function definition analyzed
  97. Visibility: force_output externally_visible no_reorder public
  98. References: xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xNumberOfSuccessfulFrees/11 (read)xNumberOfSuccessfulFrees/11 (write)
  99. Referring:
  100. Availability: available
  101. Function flags: body
  102. Called by:
  103. Calls: xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 vTaskSuspendAll/21
  104. pvPortMalloc/13 (pvPortMalloc) @06bd7e00
  105. Type: function definition analyzed
  106. Visibility: force_output externally_visible no_reorder public
  107. 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)
  108. Referring:
  109. Availability: available
  110. Function flags: body
  111. Called by:
  112. Calls: xTaskResumeAll/22 prvInsertBlockIntoFreeList/19 prvHeapInit/18 vTaskSuspendAll/21
  113. xBlockAllocatedBit/12 (xBlockAllocatedBit) @06c27678
  114. Type: variable definition analyzed
  115. Visibility: force_output no_reorder prevailing_def_ironly
  116. References:
  117. Referring: prvHeapInit/18 (write)pvPortMalloc/13 (read)pvPortMalloc/13 (read)vPortFree/14 (read)vPortFree/14 (read)vPortFree/14 (read)
  118. Availability: available
  119. Varpool flags: initialized
  120. xNumberOfSuccessfulFrees/11 (xNumberOfSuccessfulFrees) @06c275e8
  121. Type: variable definition analyzed
  122. Visibility: force_output no_reorder prevailing_def_ironly
  123. References:
  124. Referring: vPortFree/14 (write)vPortFree/14 (read)vPortGetHeapStats/20 (read)
  125. Availability: available
  126. Varpool flags: initialized
  127. xNumberOfSuccessfulAllocations/10 (xNumberOfSuccessfulAllocations) @06c275a0
  128. Type: variable definition analyzed
  129. Visibility: force_output no_reorder prevailing_def_ironly
  130. References:
  131. Referring: pvPortMalloc/13 (write)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  132. Availability: available
  133. Varpool flags: initialized
  134. xMinimumEverFreeBytesRemaining/9 (xMinimumEverFreeBytesRemaining) @06c27558
  135. Type: variable definition analyzed
  136. Visibility: force_output no_reorder prevailing_def_ironly
  137. References:
  138. Referring: pvPortMalloc/13 (write)xPortGetMinimumEverFreeHeapSize/16 (read)prvHeapInit/18 (write)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  139. Availability: available
  140. Varpool flags: initialized
  141. xFreeBytesRemaining/8 (xFreeBytesRemaining) @06c27510
  142. Type: variable definition analyzed
  143. Visibility: force_output no_reorder prevailing_def_ironly
  144. References:
  145. Referring: pvPortMalloc/13 (read)prvHeapInit/18 (write)pvPortMalloc/13 (read)vPortFree/14 (write)xPortGetFreeHeapSize/15 (read)pvPortMalloc/13 (read)pvPortMalloc/13 (read)pvPortMalloc/13 (write)vPortFree/14 (read)vPortGetHeapStats/20 (read)
  146. Availability: available
  147. Varpool flags: initialized
  148. pxEnd/7 (pxEnd) @06c27480
  149. Type: variable definition analyzed
  150. Visibility: force_output no_reorder prevailing_def_ironly
  151. References:
  152. Referring: prvHeapInit/18 (read)prvHeapInit/18 (read)prvInsertBlockIntoFreeList/19 (read)prvInsertBlockIntoFreeList/19 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)prvHeapInit/18 (read)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  153. Availability: available
  154. Varpool flags: initialized
  155. xStart/6 (xStart) @06c273f0
  156. Type: variable definition analyzed
  157. Visibility: force_output no_reorder prevailing_def_ironly
  158. References:
  159. Referring: prvHeapInit/18 (write)prvHeapInit/18 (write)pvPortMalloc/13 (read)prvInsertBlockIntoFreeList/19 (addr)pvPortMalloc/13 (addr)vPortGetHeapStats/20 (read)
  160. Availability: available
  161. Varpool flags:
  162. xHeapStructSize/5 (xHeapStructSize) @06c27360
  163. Type: variable definition analyzed
  164. Visibility: force_output no_reorder prevailing_def_ironly
  165. References:
  166. Referring:
  167. Availability: available
  168. Varpool flags: initialized read-only const-value-known
  169. ucHeap/4 (ucHeap) @06c27120
  170. Type: variable definition analyzed
  171. Visibility: force_output no_reorder prevailing_def_ironly
  172. References:
  173. Referring: prvHeapInit/18 (addr)prvHeapInit/18 (addr)
  174. Availability: available
  175. Varpool flags:
  176. vPortGetHeapStats (struct HeapStats_t * pxHeapStats)
  177. {
  178. size_t xMinSize;
  179. size_t xMaxSize;
  180. size_t xBlocks;
  181. struct BlockLink_t * pxBlock;
  182. unsigned int _1;
  183. unsigned int _2;
  184. struct BlockLink_t * pxEnd.32_3;
  185. unsigned int xFreeBytesRemaining.33_4;
  186. unsigned int xNumberOfSuccessfulAllocations.34_5;
  187. unsigned int xNumberOfSuccessfulFrees.35_6;
  188. unsigned int xMinimumEverFreeBytesRemaining.36_7;
  189. <bb 2> :
  190. xBlocks_17 = 0;
  191. xMaxSize_18 = 0;
  192. xMinSize_19 = 4294967295;
  193. vTaskSuspendAll ();
  194. pxBlock_22 = xStart.pxNextFreeBlock;
  195. if (pxBlock_22 != 0B)
  196. goto <bb 3>; [INV]
  197. else
  198. goto <bb 8>; [INV]
  199. <bb 3> :
  200. # pxBlock_8 = PHI <pxBlock_22(2), pxBlock_26(7)>
  201. # xBlocks_9 = PHI <xBlocks_17(2), xBlocks_23(7)>
  202. # xMaxSize_11 = PHI <xMaxSize_18(2), xMaxSize_12(7)>
  203. # xMinSize_14 = PHI <xMinSize_19(2), xMinSize_15(7)>
  204. xBlocks_23 = xBlocks_9 + 1;
  205. _1 = pxBlock_8->xBlockSize;
  206. if (xMaxSize_11 < _1)
  207. goto <bb 4>; [INV]
  208. else
  209. goto <bb 5>; [INV]
  210. <bb 4> :
  211. xMaxSize_24 = pxBlock_8->xBlockSize;
  212. <bb 5> :
  213. # xMaxSize_12 = PHI <xMaxSize_11(3), xMaxSize_24(4)>
  214. _2 = pxBlock_8->xBlockSize;
  215. if (xMinSize_14 > _2)
  216. goto <bb 6>; [INV]
  217. else
  218. goto <bb 7>; [INV]
  219. <bb 6> :
  220. xMinSize_25 = pxBlock_8->xBlockSize;
  221. <bb 7> :
  222. # xMinSize_15 = PHI <xMinSize_14(5), xMinSize_25(6)>
  223. pxBlock_26 = pxBlock_8->pxNextFreeBlock;
  224. pxEnd.32_3 = pxEnd;
  225. if (pxBlock_26 != pxEnd.32_3)
  226. goto <bb 3>; [INV]
  227. else
  228. goto <bb 8>; [INV]
  229. <bb 8> :
  230. # xBlocks_10 = PHI <xBlocks_17(2), xBlocks_23(7)>
  231. # xMaxSize_13 = PHI <xMaxSize_18(2), xMaxSize_12(7)>
  232. # xMinSize_16 = PHI <xMinSize_19(2), xMinSize_15(7)>
  233. xTaskResumeAll ();
  234. pxHeapStats_28(D)->xSizeOfLargestFreeBlockInBytes = xMaxSize_13;
  235. pxHeapStats_28(D)->xSizeOfSmallestFreeBlockInBytes = xMinSize_16;
  236. pxHeapStats_28(D)->xNumberOfFreeBlocks = xBlocks_10;
  237. vPortEnterCritical ();
  238. xFreeBytesRemaining.33_4 = xFreeBytesRemaining;
  239. pxHeapStats_28(D)->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.33_4;
  240. xNumberOfSuccessfulAllocations.34_5 = xNumberOfSuccessfulAllocations;
  241. pxHeapStats_28(D)->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.34_5;
  242. xNumberOfSuccessfulFrees.35_6 = xNumberOfSuccessfulFrees;
  243. pxHeapStats_28(D)->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.35_6;
  244. xMinimumEverFreeBytesRemaining.36_7 = xMinimumEverFreeBytesRemaining;
  245. pxHeapStats_28(D)->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.36_7;
  246. vPortExitCritical ();
  247. return;
  248. }
  249. prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert)
  250. {
  251. uint8_t * puc;
  252. struct BlockLink_t * pxIterator;
  253. struct A_BLOCK_LINK * _1;
  254. unsigned int _2;
  255. uint8_t * _3;
  256. unsigned int _4;
  257. unsigned int _5;
  258. unsigned int _6;
  259. unsigned int _7;
  260. uint8_t * _8;
  261. struct A_BLOCK_LINK * _9;
  262. struct A_BLOCK_LINK * _10;
  263. struct BlockLink_t * pxEnd.30_11;
  264. unsigned int _12;
  265. struct A_BLOCK_LINK * _13;
  266. unsigned int _14;
  267. unsigned int _15;
  268. struct A_BLOCK_LINK * _16;
  269. struct A_BLOCK_LINK * _17;
  270. struct BlockLink_t * pxEnd.31_18;
  271. struct A_BLOCK_LINK * _19;
  272. <bb 2> :
  273. pxIterator_25 = &xStart;
  274. goto <bb 4>; [INV]
  275. <bb 3> :
  276. pxIterator_37 = pxIterator_21->pxNextFreeBlock;
  277. <bb 4> :
  278. # pxIterator_21 = PHI <pxIterator_25(2), pxIterator_37(3)>
  279. _1 = pxIterator_21->pxNextFreeBlock;
  280. if (pxBlockToInsert_27(D) > _1)
  281. goto <bb 3>; [INV]
  282. else
  283. goto <bb 5>; [INV]
  284. <bb 5> :
  285. puc_28 = pxIterator_21;
  286. _2 = pxIterator_21->xBlockSize;
  287. _3 = puc_28 + _2;
  288. if (pxBlockToInsert_27(D) == _3)
  289. goto <bb 6>; [INV]
  290. else
  291. goto <bb 7>; [INV]
  292. <bb 6> :
  293. _4 = pxIterator_21->xBlockSize;
  294. _5 = pxBlockToInsert_27(D)->xBlockSize;
  295. _6 = _4 + _5;
  296. pxIterator_21->xBlockSize = _6;
  297. pxBlockToInsert_30 = pxIterator_21;
  298. <bb 7> :
  299. # pxBlockToInsert_20 = PHI <pxBlockToInsert_27(D)(5), pxBlockToInsert_30(6)>
  300. puc_31 = pxBlockToInsert_20;
  301. _7 = pxBlockToInsert_20->xBlockSize;
  302. _8 = puc_31 + _7;
  303. _9 = pxIterator_21->pxNextFreeBlock;
  304. if (_8 == _9)
  305. goto <bb 8>; [INV]
  306. else
  307. goto <bb 11>; [INV]
  308. <bb 8> :
  309. _10 = pxIterator_21->pxNextFreeBlock;
  310. pxEnd.30_11 = pxEnd;
  311. if (_10 != pxEnd.30_11)
  312. goto <bb 9>; [INV]
  313. else
  314. goto <bb 10>; [INV]
  315. <bb 9> :
  316. _12 = pxBlockToInsert_20->xBlockSize;
  317. _13 = pxIterator_21->pxNextFreeBlock;
  318. _14 = _13->xBlockSize;
  319. _15 = _12 + _14;
  320. pxBlockToInsert_20->xBlockSize = _15;
  321. _16 = pxIterator_21->pxNextFreeBlock;
  322. _17 = _16->pxNextFreeBlock;
  323. pxBlockToInsert_20->pxNextFreeBlock = _17;
  324. goto <bb 12>; [INV]
  325. <bb 10> :
  326. pxEnd.31_18 = pxEnd;
  327. pxBlockToInsert_20->pxNextFreeBlock = pxEnd.31_18;
  328. goto <bb 12>; [INV]
  329. <bb 11> :
  330. _19 = pxIterator_21->pxNextFreeBlock;
  331. pxBlockToInsert_20->pxNextFreeBlock = _19;
  332. <bb 12> :
  333. if (pxIterator_21 != pxBlockToInsert_20)
  334. goto <bb 13>; [INV]
  335. else
  336. goto <bb 14>; [INV]
  337. <bb 13> :
  338. pxIterator_21->pxNextFreeBlock = pxBlockToInsert_20;
  339. <bb 14> :
  340. return;
  341. }
  342. prvHeapInit ()
  343. {
  344. size_t xTotalHeapSize;
  345. size_t uxAddress;
  346. uint8_t * pucAlignedHeap;
  347. struct BlockLink_t * pxFirstFreeBlock;
  348. unsigned int _1;
  349. unsigned int _2;
  350. unsigned int ucHeap.22_3;
  351. unsigned int pucAlignedHeap.23_4;
  352. unsigned int xHeapStructSize.24_5;
  353. struct BlockLink_t * uxAddress.25_6;
  354. struct BlockLink_t * pxEnd.26_7;
  355. struct BlockLink_t * pxEnd.27_8;
  356. unsigned int pxFirstFreeBlock.28_9;
  357. unsigned int _10;
  358. struct BlockLink_t * pxEnd.29_11;
  359. unsigned int _12;
  360. unsigned int _13;
  361. <bb 2> :
  362. xTotalHeapSize_16 = 8192;
  363. uxAddress_17 = (size_t) &ucHeap;
  364. _1 = uxAddress_17 & 7;
  365. if (_1 != 0)
  366. goto <bb 3>; [INV]
  367. else
  368. goto <bb 4>; [INV]
  369. <bb 3> :
  370. uxAddress_18 = uxAddress_17 + 7;
  371. uxAddress_19 = uxAddress_18 & 4294967288;
  372. _2 = xTotalHeapSize_16 - uxAddress_19;
  373. ucHeap.22_3 = (unsigned int) &ucHeap;
  374. xTotalHeapSize_20 = _2 + ucHeap.22_3;
  375. <bb 4> :
  376. # uxAddress_14 = PHI <uxAddress_17(2), uxAddress_19(3)>
  377. # xTotalHeapSize_15 = PHI <xTotalHeapSize_16(2), xTotalHeapSize_20(3)>
  378. pucAlignedHeap_21 = (uint8_t *) uxAddress_14;
  379. xStart.pxNextFreeBlock = pucAlignedHeap_21;
  380. xStart.xBlockSize = 0;
  381. pucAlignedHeap.23_4 = (unsigned int) pucAlignedHeap_21;
  382. uxAddress_25 = xTotalHeapSize_15 + pucAlignedHeap.23_4;
  383. xHeapStructSize.24_5 = 8;
  384. uxAddress_26 = uxAddress_25 - xHeapStructSize.24_5;
  385. uxAddress_27 = uxAddress_26 & 4294967288;
  386. uxAddress.25_6 = (struct BlockLink_t *) uxAddress_27;
  387. pxEnd = uxAddress.25_6;
  388. pxEnd.26_7 = pxEnd;
  389. pxEnd.26_7->xBlockSize = 0;
  390. pxEnd.27_8 = pxEnd;
  391. pxEnd.27_8->pxNextFreeBlock = 0B;
  392. pxFirstFreeBlock_31 = pucAlignedHeap_21;
  393. pxFirstFreeBlock.28_9 = (unsigned int) pxFirstFreeBlock_31;
  394. _10 = uxAddress_27 - pxFirstFreeBlock.28_9;
  395. pxFirstFreeBlock_31->xBlockSize = _10;
  396. pxEnd.29_11 = pxEnd;
  397. pxFirstFreeBlock_31->pxNextFreeBlock = pxEnd.29_11;
  398. _12 = pxFirstFreeBlock_31->xBlockSize;
  399. xMinimumEverFreeBytesRemaining = _12;
  400. _13 = pxFirstFreeBlock_31->xBlockSize;
  401. xFreeBytesRemaining = _13;
  402. xBlockAllocatedBit = 2147483648;
  403. return;
  404. }
  405. vPortInitialiseBlocks ()
  406. {
  407. <bb 2> :
  408. return;
  409. }
  410. xPortGetMinimumEverFreeHeapSize ()
  411. {
  412. size_t D.6339;
  413. size_t _2;
  414. <bb 2> :
  415. _2 = xMinimumEverFreeBytesRemaining;
  416. <bb 3> :
  417. <L0>:
  418. return _2;
  419. }
  420. xPortGetFreeHeapSize ()
  421. {
  422. size_t D.6337;
  423. size_t _2;
  424. <bb 2> :
  425. _2 = xFreeBytesRemaining;
  426. <bb 3> :
  427. <L0>:
  428. return _2;
  429. }
  430. vPortFree (void * pv)
  431. {
  432. uint32_t ulNewBASEPRI;
  433. uint32_t ulNewBASEPRI;
  434. struct BlockLink_t * pxLink;
  435. uint8_t * puc;
  436. unsigned int xHeapStructSize.16_1;
  437. sizetype _2;
  438. unsigned int _3;
  439. unsigned int xBlockAllocatedBit.17_4;
  440. unsigned int _5;
  441. struct A_BLOCK_LINK * _6;
  442. unsigned int _7;
  443. unsigned int xBlockAllocatedBit.18_8;
  444. unsigned int _9;
  445. struct A_BLOCK_LINK * _10;
  446. unsigned int _11;
  447. unsigned int xBlockAllocatedBit.19_12;
  448. unsigned int _13;
  449. unsigned int _14;
  450. unsigned int _15;
  451. unsigned int xFreeBytesRemaining.20_16;
  452. unsigned int _17;
  453. unsigned int xNumberOfSuccessfulFrees.21_18;
  454. unsigned int _19;
  455. <bb 2> :
  456. puc_22 = pv_21(D);
  457. if (pv_21(D) != 0B)
  458. goto <bb 3>; [INV]
  459. else
  460. goto <bb 14>; [INV]
  461. <bb 3> :
  462. xHeapStructSize.16_1 = 8;
  463. _2 = -xHeapStructSize.16_1;
  464. puc_24 = puc_22 + _2;
  465. pxLink_25 = puc_24;
  466. _3 = pxLink_25->xBlockSize;
  467. xBlockAllocatedBit.17_4 = xBlockAllocatedBit;
  468. _5 = _3 & xBlockAllocatedBit.17_4;
  469. if (_5 == 0)
  470. goto <bb 4>; [INV]
  471. else
  472. goto <bb 7>; [INV]
  473. <bb 4> :
  474. __asm__ __volatile__(" mov %0, %1
  475. msr basepri, %0
  476. isb
  477. dsb
  478. " : "=r" ulNewBASEPRI_32 : "i" 16 : "memory");
  479. <bb 5> :
  480. <bb 6> :
  481. goto <bb 6>; [INV]
  482. <bb 7> :
  483. _6 = pxLink_25->pxNextFreeBlock;
  484. if (_6 != 0B)
  485. goto <bb 8>; [INV]
  486. else
  487. goto <bb 11>; [INV]
  488. <bb 8> :
  489. __asm__ __volatile__(" mov %0, %1
  490. msr basepri, %0
  491. isb
  492. dsb
  493. " : "=r" ulNewBASEPRI_33 : "i" 16 : "memory");
  494. <bb 9> :
  495. <bb 10> :
  496. goto <bb 10>; [INV]
  497. <bb 11> :
  498. _7 = pxLink_25->xBlockSize;
  499. xBlockAllocatedBit.18_8 = xBlockAllocatedBit;
  500. _9 = _7 & xBlockAllocatedBit.18_8;
  501. if (_9 != 0)
  502. goto <bb 12>; [INV]
  503. else
  504. goto <bb 14>; [INV]
  505. <bb 12> :
  506. _10 = pxLink_25->pxNextFreeBlock;
  507. if (_10 == 0B)
  508. goto <bb 13>; [INV]
  509. else
  510. goto <bb 14>; [INV]
  511. <bb 13> :
  512. _11 = pxLink_25->xBlockSize;
  513. xBlockAllocatedBit.19_12 = xBlockAllocatedBit;
  514. _13 = ~xBlockAllocatedBit.19_12;
  515. _14 = _11 & _13;
  516. pxLink_25->xBlockSize = _14;
  517. vTaskSuspendAll ();
  518. _15 = pxLink_25->xBlockSize;
  519. xFreeBytesRemaining.20_16 = xFreeBytesRemaining;
  520. _17 = _15 + xFreeBytesRemaining.20_16;
  521. xFreeBytesRemaining = _17;
  522. prvInsertBlockIntoFreeList (pxLink_25);
  523. xNumberOfSuccessfulFrees.21_18 = xNumberOfSuccessfulFrees;
  524. _19 = xNumberOfSuccessfulFrees.21_18 + 1;
  525. xNumberOfSuccessfulFrees = _19;
  526. xTaskResumeAll ();
  527. <bb 14> :
  528. return;
  529. }
  530. pvPortMalloc (size_t xWantedSize)
  531. {
  532. uint32_t ulNewBASEPRI;
  533. uint32_t ulNewBASEPRI;
  534. uint32_t ulNewBASEPRI;
  535. void * pvReturn;
  536. struct BlockLink_t * pxNewBlockLink;
  537. struct BlockLink_t * pxPreviousBlock;
  538. struct BlockLink_t * pxBlock;
  539. void * D.6323;
  540. struct BlockLink_t * pxEnd.0_1;
  541. unsigned int xBlockAllocatedBit.1_2;
  542. unsigned int _3;
  543. unsigned int xHeapStructSize.2_4;
  544. unsigned int _5;
  545. unsigned int xHeapStructSize.3_6;
  546. unsigned int _7;
  547. unsigned int _8;
  548. unsigned int _9;
  549. unsigned int _10;
  550. unsigned int _11;
  551. unsigned int xFreeBytesRemaining.4_12;
  552. unsigned int _13;
  553. struct A_BLOCK_LINK * _14;
  554. struct BlockLink_t * pxEnd.5_15;
  555. struct A_BLOCK_LINK * _16;
  556. unsigned int xHeapStructSize.6_17;
  557. struct A_BLOCK_LINK * _18;
  558. unsigned int _19;
  559. unsigned int _20;
  560. unsigned int xHeapStructSize.7_21;
  561. unsigned int _22;
  562. unsigned int pxNewBlockLink.8_23;
  563. unsigned int _24;
  564. unsigned int _25;
  565. unsigned int _26;
  566. unsigned int xFreeBytesRemaining.9_27;
  567. unsigned int _28;
  568. unsigned int _29;
  569. unsigned int xFreeBytesRemaining.10_30;
  570. unsigned int xMinimumEverFreeBytesRemaining.11_31;
  571. unsigned int xFreeBytesRemaining.12_32;
  572. unsigned int _33;
  573. unsigned int xBlockAllocatedBit.13_34;
  574. unsigned int _35;
  575. unsigned int xNumberOfSuccessfulAllocations.14_36;
  576. unsigned int _37;
  577. unsigned int pvReturn.15_38;
  578. unsigned int _39;
  579. void * _74;
  580. <bb 2> :
  581. pvReturn_49 = 0B;
  582. vTaskSuspendAll ();
  583. pxEnd.0_1 = pxEnd;
  584. if (pxEnd.0_1 == 0B)
  585. goto <bb 3>; [INV]
  586. else
  587. goto <bb 4>; [INV]
  588. <bb 3> :
  589. prvHeapInit ();
  590. <bb 4> :
  591. xBlockAllocatedBit.1_2 = xBlockAllocatedBit;
  592. _3 = xWantedSize_53(D) & xBlockAllocatedBit.1_2;
  593. if (_3 == 0)
  594. goto <bb 5>; [INV]
  595. else
  596. goto <bb 32>; [INV]
  597. <bb 5> :
  598. if (xWantedSize_53(D) != 0)
  599. goto <bb 6>; [INV]
  600. else
  601. goto <bb 15>; [INV]
  602. <bb 6> :
  603. xHeapStructSize.2_4 = 8;
  604. _5 = xWantedSize_53(D) + xHeapStructSize.2_4;
  605. if (xWantedSize_53(D) < _5)
  606. goto <bb 7>; [INV]
  607. else
  608. goto <bb 15>; [INV]
  609. <bb 7> :
  610. xHeapStructSize.3_6 = 8;
  611. xWantedSize_54 = xWantedSize_53(D) + xHeapStructSize.3_6;
  612. _7 = xWantedSize_54 & 7;
  613. if (_7 != 0)
  614. goto <bb 8>; [INV]
  615. else
  616. goto <bb 14>; [INV]
  617. <bb 8> :
  618. _8 = xWantedSize_54 & 4294967288;
  619. _9 = _8 + 8;
  620. if (xWantedSize_54 < _9)
  621. goto <bb 9>; [INV]
  622. else
  623. goto <bb 13>; [INV]
  624. <bb 9> :
  625. _10 = xWantedSize_54 & 4294967288;
  626. xWantedSize_56 = _10 + 8;
  627. _11 = xWantedSize_56 & 7;
  628. if (_11 != 0)
  629. goto <bb 10>; [INV]
  630. else
  631. goto <bb 14>; [INV]
  632. <bb 10> :
  633. __asm__ __volatile__(" mov %0, %1
  634. msr basepri, %0
  635. isb
  636. dsb
  637. " : "=r" ulNewBASEPRI_75 : "i" 16 : "memory");
  638. <bb 11> :
  639. <bb 12> :
  640. goto <bb 12>; [INV]
  641. <bb 13> :
  642. xWantedSize_55 = 0;
  643. <bb 14> :
  644. # xWantedSize_40 = PHI <xWantedSize_54(7), xWantedSize_55(13), xWantedSize_56(9)>
  645. goto <bb 16>; [INV]
  646. <bb 15> :
  647. xWantedSize_57 = 0;
  648. <bb 16> :
  649. # xWantedSize_41 = PHI <xWantedSize_40(14), xWantedSize_57(15)>
  650. if (xWantedSize_41 != 0)
  651. goto <bb 17>; [INV]
  652. else
  653. goto <bb 32>; [INV]
  654. <bb 17> :
  655. xFreeBytesRemaining.4_12 = xFreeBytesRemaining;
  656. if (xWantedSize_41 <= xFreeBytesRemaining.4_12)
  657. goto <bb 18>; [INV]
  658. else
  659. goto <bb 32>; [INV]
  660. <bb 18> :
  661. pxPreviousBlock_58 = &xStart;
  662. pxBlock_59 = xStart.pxNextFreeBlock;
  663. goto <bb 20>; [INV]
  664. <bb 19> :
  665. pxPreviousBlock_60 = pxBlock_42;
  666. pxBlock_61 = pxBlock_42->pxNextFreeBlock;
  667. <bb 20> :
  668. # pxBlock_42 = PHI <pxBlock_59(18), pxBlock_61(19)>
  669. # pxPreviousBlock_43 = PHI <pxPreviousBlock_58(18), pxPreviousBlock_60(19)>
  670. _13 = pxBlock_42->xBlockSize;
  671. if (xWantedSize_41 > _13)
  672. goto <bb 21>; [INV]
  673. else
  674. goto <bb 22>; [INV]
  675. <bb 21> :
  676. _14 = pxBlock_42->pxNextFreeBlock;
  677. if (_14 != 0B)
  678. goto <bb 19>; [INV]
  679. else
  680. goto <bb 22>; [INV]
  681. <bb 22> :
  682. pxEnd.5_15 = pxEnd;
  683. if (pxBlock_42 != pxEnd.5_15)
  684. goto <bb 23>; [INV]
  685. else
  686. goto <bb 32>; [INV]
  687. <bb 23> :
  688. _16 = pxPreviousBlock_43->pxNextFreeBlock;
  689. xHeapStructSize.6_17 = 8;
  690. pvReturn_62 = _16 + xHeapStructSize.6_17;
  691. _18 = pxBlock_42->pxNextFreeBlock;
  692. pxPreviousBlock_43->pxNextFreeBlock = _18;
  693. _19 = pxBlock_42->xBlockSize;
  694. _20 = _19 - xWantedSize_41;
  695. xHeapStructSize.7_21 = 8;
  696. _22 = xHeapStructSize.7_21 << 1;
  697. if (_20 > _22)
  698. goto <bb 24>; [INV]
  699. else
  700. goto <bb 29>; [INV]
  701. <bb 24> :
  702. pxNewBlockLink_64 = pxBlock_42 + xWantedSize_41;
  703. pxNewBlockLink.8_23 = (unsigned int) pxNewBlockLink_64;
  704. _24 = pxNewBlockLink.8_23 & 7;
  705. if (_24 != 0)
  706. goto <bb 25>; [INV]
  707. else
  708. goto <bb 28>; [INV]
  709. <bb 25> :
  710. __asm__ __volatile__(" mov %0, %1
  711. msr basepri, %0
  712. isb
  713. dsb
  714. " : "=r" ulNewBASEPRI_76 : "i" 16 : "memory");
  715. <bb 26> :
  716. <bb 27> :
  717. goto <bb 27>; [INV]
  718. <bb 28> :
  719. _25 = pxBlock_42->xBlockSize;
  720. _26 = _25 - xWantedSize_41;
  721. pxNewBlockLink_64->xBlockSize = _26;
  722. pxBlock_42->xBlockSize = xWantedSize_41;
  723. prvInsertBlockIntoFreeList (pxNewBlockLink_64);
  724. <bb 29> :
  725. xFreeBytesRemaining.9_27 = xFreeBytesRemaining;
  726. _28 = pxBlock_42->xBlockSize;
  727. _29 = xFreeBytesRemaining.9_27 - _28;
  728. xFreeBytesRemaining = _29;
  729. xFreeBytesRemaining.10_30 = xFreeBytesRemaining;
  730. xMinimumEverFreeBytesRemaining.11_31 = xMinimumEverFreeBytesRemaining;
  731. if (xFreeBytesRemaining.10_30 < xMinimumEverFreeBytesRemaining.11_31)
  732. goto <bb 30>; [INV]
  733. else
  734. goto <bb 31>; [INV]
  735. <bb 30> :
  736. xFreeBytesRemaining.12_32 = xFreeBytesRemaining;
  737. xMinimumEverFreeBytesRemaining = xFreeBytesRemaining.12_32;
  738. <bb 31> :
  739. _33 = pxBlock_42->xBlockSize;
  740. xBlockAllocatedBit.13_34 = xBlockAllocatedBit;
  741. _35 = _33 | xBlockAllocatedBit.13_34;
  742. pxBlock_42->xBlockSize = _35;
  743. pxBlock_42->pxNextFreeBlock = 0B;
  744. xNumberOfSuccessfulAllocations.14_36 = xNumberOfSuccessfulAllocations;
  745. _37 = xNumberOfSuccessfulAllocations.14_36 + 1;
  746. xNumberOfSuccessfulAllocations = _37;
  747. <bb 32> :
  748. # pvReturn_44 = PHI <pvReturn_49(4), pvReturn_49(17), pvReturn_49(16), pvReturn_49(22), pvReturn_62(31)>
  749. xTaskResumeAll ();
  750. pvReturn.15_38 = (unsigned int) pvReturn_44;
  751. _39 = pvReturn.15_38 & 7;
  752. if (_39 != 0)
  753. goto <bb 33>; [INV]
  754. else
  755. goto <bb 36>; [INV]
  756. <bb 33> :
  757. __asm__ __volatile__(" mov %0, %1
  758. msr basepri, %0
  759. isb
  760. dsb
  761. " : "=r" ulNewBASEPRI_77 : "i" 16 : "memory");
  762. <bb 34> :
  763. <bb 35> :
  764. goto <bb 35>; [INV]
  765. <bb 36> :
  766. _74 = pvReturn_44;
  767. <bb 37> :
  768. <L43>:
  769. return _74;
  770. }