heap_4.c.048i.remove_symbols 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909
  1. Reclaiming functions:
  2. Reclaiming variables:
  3. Clearing address taken flags:
  4. Symbol table:
  5. vPortExitCritical/24 (vPortExitCritical) @06a51e00
  6. Type: function
  7. Visibility: external public
  8. References:
  9. Referring:
  10. Availability: not_available
  11. Function flags: optimize_size
  12. Called by: vPortGetHeapStats/20 (168730858 (estimated locally),1.00 per call)
  13. Calls:
  14. vPortEnterCritical/23 (vPortEnterCritical) @06a51c40
  15. Type: function
  16. Visibility: external public
  17. References:
  18. Referring:
  19. Availability: not_available
  20. Function flags: optimize_size
  21. Called by: vPortGetHeapStats/20 (168730858 (estimated locally),1.00 per call)
  22. Calls:
  23. xTaskResumeAll/22 (xTaskResumeAll) @06a512a0
  24. Type: function
  25. Visibility: external public
  26. References:
  27. Referring:
  28. Availability: not_available
  29. Function flags: optimize_size
  30. Called by: vPortGetHeapStats/20 (168730858 (estimated locally),1.00 per call) vPortFree/14 (18715 (estimated locally),0.06 per call) pvPortMalloc/13 (214748 (estimated locally),0.93 per call)
  31. Calls:
  32. vTaskSuspendAll/21 (vTaskSuspendAll) @06a510e0
  33. Type: function
  34. Visibility: external public
  35. References:
  36. Referring:
  37. Availability: not_available
  38. Function flags: optimize_size
  39. Called by: vPortGetHeapStats/20 (168730857 (estimated locally),1.00 per call) vPortFree/14 (18715 (estimated locally),0.06 per call) pvPortMalloc/13 (231566 (estimated locally),1.00 per call)
  40. Calls:
  41. vPortGetHeapStats/20 (vPortGetHeapStats) @06aa50e0
  42. Type: function definition analyzed
  43. Visibility: externally_visible 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: count:168730857 (estimated locally) body optimize_size
  48. Called by:
  49. Calls: vPortExitCritical/24 (168730858 (estimated locally),1.00 per call) vPortEnterCritical/23 (168730858 (estimated locally),1.00 per call) xTaskResumeAll/22 (168730858 (estimated locally),1.00 per call) vTaskSuspendAll/21 (168730857 (estimated locally),1.00 per call)
  50. prvInsertBlockIntoFreeList/19 (prvInsertBlockIntoFreeList) @06aa5d20
  51. Type: function definition analyzed
  52. Visibility: prevailing_def_ironly
  53. References: xStart/6 (addr)pxEnd/7 (read)
  54. Referring:
  55. Availability: local
  56. Function flags: count:118111600 (estimated locally) body local optimize_size
  57. Called by: vPortFree/14 (18715 (estimated locally),0.06 per call) pvPortMalloc/13 (8283 (estimated locally),0.04 per call)
  58. Calls:
  59. prvHeapInit/18 (prvHeapInit) @06aa5a80
  60. Type: function definition analyzed
  61. Visibility: prevailing_def_ironly
  62. References: ucHeap/4 (addr)xStart/6 (write)xStart/6 (write)pxEnd/7 (write)xMinimumEverFreeBytesRemaining/9 (write)xFreeBytesRemaining/8 (write)xBlockAllocatedBit/12 (write)
  63. Referring:
  64. Availability: local
  65. Function flags: count:1073741824 (estimated locally) body local optimize_size
  66. Called by: pvPortMalloc/13 (40362 (estimated locally),0.17 per call)
  67. Calls:
  68. vPortInitialiseBlocks/17 (vPortInitialiseBlocks) @06aa57e0
  69. Type: function definition analyzed
  70. Visibility: externally_visible public
  71. References:
  72. Referring:
  73. Availability: available
  74. Function flags: count:1073741824 (estimated locally) body optimize_size
  75. Called by:
  76. Calls:
  77. xPortGetMinimumEverFreeHeapSize/16 (xPortGetMinimumEverFreeHeapSize) @06aa5540
  78. Type: function definition analyzed
  79. Visibility: externally_visible public
  80. References: xMinimumEverFreeBytesRemaining/9 (read)
  81. Referring:
  82. Availability: available
  83. Function flags: count:1073741824 (estimated locally) body optimize_size
  84. Called by:
  85. Calls:
  86. xPortGetFreeHeapSize/15 (xPortGetFreeHeapSize) @06aa52a0
  87. Type: function definition analyzed
  88. Visibility: externally_visible public
  89. References: xFreeBytesRemaining/8 (read)
  90. Referring:
  91. Availability: available
  92. Function flags: count:1073741824 (estimated locally) body optimize_size
  93. Called by:
  94. Calls:
  95. vPortFree/14 (vPortFree) @06aa5000
  96. Type: function definition analyzed
  97. Visibility: externally_visible public
  98. References: xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xNumberOfSuccessfulFrees/11 (read)xNumberOfSuccessfulFrees/11 (write)
  99. Referring:
  100. Availability: available
  101. Function flags: count:306783 (estimated locally) body optimize_size
  102. Called by:
  103. Calls: xTaskResumeAll/22 (18715 (estimated locally),0.06 per call) prvInsertBlockIntoFreeList/19 (18715 (estimated locally),0.06 per call) vTaskSuspendAll/21 (18715 (estimated locally),0.06 per call)
  104. pvPortMalloc/13 (pvPortMalloc) @06a9dee0
  105. Type: function definition analyzed
  106. Visibility: externally_visible public
  107. References: pxEnd/7 (read)xBlockAllocatedBit/12 (read)xFreeBytesRemaining/8 (read)xStart/6 (read)xStart/6 (addr)pxEnd/7 (read)xFreeBytesRemaining/8 (read)xFreeBytesRemaining/8 (write)xMinimumEverFreeBytesRemaining/9 (read)xMinimumEverFreeBytesRemaining/9 (write)xBlockAllocatedBit/12 (read)xNumberOfSuccessfulAllocations/10 (read)xNumberOfSuccessfulAllocations/10 (write)
  108. Referring:
  109. Availability: available
  110. Function flags: count:231566 (estimated locally) body optimize_size
  111. Called by:
  112. Calls: xTaskResumeAll/22 (214748 (estimated locally),0.93 per call) prvInsertBlockIntoFreeList/19 (8283 (estimated locally),0.04 per call) prvHeapInit/18 (40362 (estimated locally),0.17 per call) vTaskSuspendAll/21 (231566 (estimated locally),1.00 per call)
  113. xBlockAllocatedBit/12 (xBlockAllocatedBit) @06a9a678
  114. Type: variable definition analyzed
  115. Visibility: prevailing_def_ironly
  116. References:
  117. Referring: pvPortMalloc/13 (read)pvPortMalloc/13 (read)prvHeapInit/18 (write)vPortFree/14 (read)
  118. Availability: available
  119. Varpool flags: initialized
  120. xNumberOfSuccessfulFrees/11 (xNumberOfSuccessfulFrees) @06a9a5e8
  121. Type: variable definition analyzed
  122. Visibility: 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) @06a9a5a0
  128. Type: variable definition analyzed
  129. Visibility: 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) @06a9a558
  135. Type: variable definition analyzed
  136. Visibility: prevailing_def_ironly
  137. References:
  138. Referring: prvHeapInit/18 (write)xPortGetMinimumEverFreeHeapSize/16 (read)pvPortMalloc/13 (write)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  139. Availability: available
  140. Varpool flags: initialized
  141. xFreeBytesRemaining/8 (xFreeBytesRemaining) @06a9a510
  142. Type: variable definition analyzed
  143. Visibility: prevailing_def_ironly
  144. References:
  145. Referring: vPortFree/14 (write)pvPortMalloc/13 (read)prvHeapInit/18 (write)pvPortMalloc/13 (write)xPortGetFreeHeapSize/15 (read)pvPortMalloc/13 (read)vPortFree/14 (read)vPortGetHeapStats/20 (read)
  146. Availability: available
  147. Varpool flags: initialized
  148. pxEnd/7 (pxEnd) @06a9a480
  149. Type: variable definition analyzed
  150. Visibility: prevailing_def_ironly
  151. References:
  152. Referring: pvPortMalloc/13 (read)prvHeapInit/18 (write)prvInsertBlockIntoFreeList/19 (read)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  153. Availability: available
  154. Varpool flags: initialized
  155. xStart/6 (xStart) @06a9a3f0
  156. Type: variable definition analyzed
  157. Visibility: prevailing_def_ironly
  158. References:
  159. Referring: prvHeapInit/18 (write)prvHeapInit/18 (write)pvPortMalloc/13 (addr)prvInsertBlockIntoFreeList/19 (addr)pvPortMalloc/13 (read)vPortGetHeapStats/20 (read)
  160. Availability: available
  161. Varpool flags:
  162. ucHeap/4 (ucHeap) @06a9a120
  163. Type: variable definition analyzed
  164. Visibility: prevailing_def_ironly
  165. References:
  166. Referring: prvHeapInit/18 (addr)
  167. Availability: available
  168. Varpool flags:
  169. vPortGetHeapStats (struct HeapStats_t * pxHeapStats)
  170. {
  171. size_t xMinSize;
  172. size_t xMaxSize;
  173. size_t xBlocks;
  174. struct BlockLink_t * pxBlock;
  175. unsigned int _1;
  176. struct BlockLink_t * pxEnd.26_3;
  177. unsigned int xFreeBytesRemaining.27_4;
  178. unsigned int xNumberOfSuccessfulAllocations.28_5;
  179. unsigned int xNumberOfSuccessfulFrees.29_6;
  180. unsigned int xMinimumEverFreeBytesRemaining.30_7;
  181. <bb 2> [local count: 168730857]:
  182. # DEBUG BEGIN_STMT
  183. # DEBUG BEGIN_STMT
  184. # DEBUG xBlocks => 0
  185. # DEBUG xMaxSize => 0
  186. # DEBUG xMinSize => 4294967295
  187. # DEBUG BEGIN_STMT
  188. vTaskSuspendAll ();
  189. # DEBUG BEGIN_STMT
  190. pxBlock_17 = xStart.pxNextFreeBlock;
  191. # DEBUG pxBlock => pxBlock_17
  192. # DEBUG BEGIN_STMT
  193. if (pxBlock_17 != 0B)
  194. goto <bb 5>; [70.00%]
  195. else
  196. goto <bb 4>; [30.00%]
  197. <bb 5> [local count: 118111600]:
  198. <bb 3> [local count: 1073741824]:
  199. # pxBlock_8 = PHI <pxBlock_17(5), pxBlock_20(6)>
  200. # xBlocks_9 = PHI <0(5), xBlocks_18(6)>
  201. # xMaxSize_11 = PHI <0(5), xMaxSize_2(6)>
  202. # xMinSize_13 = PHI <4294967295(5), xMinSize_19(6)>
  203. # DEBUG xMinSize => xMinSize_13
  204. # DEBUG xMaxSize => xMaxSize_11
  205. # DEBUG xBlocks => xBlocks_9
  206. # DEBUG pxBlock => pxBlock_8
  207. # DEBUG BEGIN_STMT
  208. # DEBUG BEGIN_STMT
  209. xBlocks_18 = xBlocks_9 + 1;
  210. # DEBUG xBlocks => xBlocks_18
  211. # DEBUG BEGIN_STMT
  212. _1 = pxBlock_8->xBlockSize;
  213. xMaxSize_2 = MAX_EXPR <_1, xMaxSize_11>;
  214. # DEBUG xMaxSize => xMaxSize_2
  215. # DEBUG BEGIN_STMT
  216. xMinSize_19 = MIN_EXPR <_1, xMinSize_13>;
  217. # DEBUG xMinSize => xMinSize_19
  218. # DEBUG BEGIN_STMT
  219. pxBlock_20 = pxBlock_8->pxNextFreeBlock;
  220. # DEBUG pxBlock => pxBlock_20
  221. # DEBUG BEGIN_STMT
  222. pxEnd.26_3 = pxEnd;
  223. if (pxEnd.26_3 != pxBlock_20)
  224. goto <bb 6>; [89.00%]
  225. else
  226. goto <bb 4>; [11.00%]
  227. <bb 6> [local count: 955630225]:
  228. goto <bb 3>; [100.00%]
  229. <bb 4> [local count: 168730858]:
  230. # xBlocks_10 = PHI <0(2), xBlocks_18(3)>
  231. # xMaxSize_12 = PHI <0(2), xMaxSize_2(3)>
  232. # xMinSize_14 = PHI <4294967295(2), xMinSize_19(3)>
  233. # DEBUG xMinSize => xMinSize_14
  234. # DEBUG xMaxSize => xMaxSize_12
  235. # DEBUG xBlocks => xBlocks_10
  236. # DEBUG BEGIN_STMT
  237. xTaskResumeAll ();
  238. # DEBUG BEGIN_STMT
  239. pxHeapStats_22(D)->xSizeOfLargestFreeBlockInBytes = xMaxSize_12;
  240. # DEBUG BEGIN_STMT
  241. pxHeapStats_22(D)->xSizeOfSmallestFreeBlockInBytes = xMinSize_14;
  242. # DEBUG BEGIN_STMT
  243. pxHeapStats_22(D)->xNumberOfFreeBlocks = xBlocks_10;
  244. # DEBUG BEGIN_STMT
  245. vPortEnterCritical ();
  246. # DEBUG BEGIN_STMT
  247. xFreeBytesRemaining.27_4 = xFreeBytesRemaining;
  248. pxHeapStats_22(D)->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.27_4;
  249. # DEBUG BEGIN_STMT
  250. xNumberOfSuccessfulAllocations.28_5 = xNumberOfSuccessfulAllocations;
  251. pxHeapStats_22(D)->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.28_5;
  252. # DEBUG BEGIN_STMT
  253. xNumberOfSuccessfulFrees.29_6 = xNumberOfSuccessfulFrees;
  254. pxHeapStats_22(D)->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.29_6;
  255. # DEBUG BEGIN_STMT
  256. xMinimumEverFreeBytesRemaining.30_7 = xMinimumEverFreeBytesRemaining;
  257. pxHeapStats_22(D)->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.30_7;
  258. # DEBUG BEGIN_STMT
  259. vPortExitCritical ();
  260. return;
  261. }
  262. prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert)
  263. {
  264. struct BlockLink_t * pxIterator;
  265. struct A_BLOCK_LINK * _1;
  266. unsigned int _2;
  267. uint8_t * _3;
  268. unsigned int _5;
  269. unsigned int _6;
  270. unsigned int _7;
  271. uint8_t * _8;
  272. struct BlockLink_t * pxEnd.19_9;
  273. unsigned int _10;
  274. unsigned int _11;
  275. struct A_BLOCK_LINK * _12;
  276. struct A_BLOCK_LINK * _20;
  277. <bb 2> [local count: 118111600]:
  278. # DEBUG BEGIN_STMT
  279. # DEBUG BEGIN_STMT
  280. # DEBUG BEGIN_STMT
  281. # DEBUG pxIterator => &xStart
  282. <bb 3> [local count: 1073741824]:
  283. # pxIterator_14 = PHI <&xStart(2), _1(14)>
  284. # DEBUG pxIterator => pxIterator_14
  285. # DEBUG BEGIN_STMT
  286. _1 = pxIterator_14->pxNextFreeBlock;
  287. if (_1 < pxBlockToInsert_19(D))
  288. goto <bb 14>; [89.00%]
  289. else
  290. goto <bb 4>; [11.00%]
  291. <bb 14> [local count: 955630223]:
  292. goto <bb 3>; [100.00%]
  293. <bb 4> [local count: 118111601]:
  294. # _20 = PHI <_1(3)>
  295. # pxIterator_4 = PHI <pxIterator_14(3)>
  296. # DEBUG BEGIN_STMT
  297. # DEBUG puc => pxIterator_4
  298. # DEBUG BEGIN_STMT
  299. _2 = pxIterator_4->xBlockSize;
  300. _3 = pxIterator_4 + _2;
  301. if (_3 == pxBlockToInsert_19(D))
  302. goto <bb 5>; [30.00%]
  303. else
  304. goto <bb 6>; [70.00%]
  305. <bb 5> [local count: 35433480]:
  306. # DEBUG BEGIN_STMT
  307. _5 = pxBlockToInsert_19(D)->xBlockSize;
  308. _6 = _2 + _5;
  309. pxIterator_4->xBlockSize = _6;
  310. # DEBUG BEGIN_STMT
  311. # DEBUG pxBlockToInsert => pxIterator_4
  312. <bb 6> [local count: 118111601]:
  313. # pxBlockToInsert_13 = PHI <pxBlockToInsert_19(D)(4), pxIterator_4(5)>
  314. # DEBUG pxBlockToInsert => pxBlockToInsert_13
  315. # DEBUG BEGIN_STMT
  316. # DEBUG BEGIN_STMT
  317. # DEBUG puc => pxBlockToInsert_13
  318. # DEBUG BEGIN_STMT
  319. _7 = pxBlockToInsert_13->xBlockSize;
  320. _8 = pxBlockToInsert_13 + _7;
  321. if (_8 == _20)
  322. goto <bb 7>; [30.00%]
  323. else
  324. goto <bb 10>; [70.00%]
  325. <bb 7> [local count: 35433480]:
  326. # DEBUG BEGIN_STMT
  327. pxEnd.19_9 = pxEnd;
  328. if (pxEnd.19_9 != _20)
  329. goto <bb 8>; [70.00%]
  330. else
  331. goto <bb 9>; [30.00%]
  332. <bb 8> [local count: 24803436]:
  333. # DEBUG BEGIN_STMT
  334. _10 = _20->xBlockSize;
  335. _11 = _7 + _10;
  336. pxBlockToInsert_13->xBlockSize = _11;
  337. # DEBUG BEGIN_STMT
  338. _12 = _20->pxNextFreeBlock;
  339. pxBlockToInsert_13->pxNextFreeBlock = _12;
  340. goto <bb 11>; [100.00%]
  341. <bb 9> [local count: 10630044]:
  342. # DEBUG BEGIN_STMT
  343. pxBlockToInsert_13->pxNextFreeBlock = pxEnd.19_9;
  344. goto <bb 11>; [100.00%]
  345. <bb 10> [local count: 82678120]:
  346. # DEBUG BEGIN_STMT
  347. pxBlockToInsert_13->pxNextFreeBlock = _20;
  348. <bb 11> [local count: 118111601]:
  349. # DEBUG BEGIN_STMT
  350. if (pxIterator_4 != pxBlockToInsert_13)
  351. goto <bb 12>; [70.00%]
  352. else
  353. goto <bb 13>; [30.00%]
  354. <bb 12> [local count: 82678120]:
  355. # DEBUG BEGIN_STMT
  356. pxIterator_4->pxNextFreeBlock = pxBlockToInsert_13;
  357. <bb 13> [local count: 118111601]:
  358. # DEBUG BEGIN_STMT
  359. return;
  360. }
  361. prvHeapInit ()
  362. {
  363. size_t xTotalHeapSize;
  364. size_t uxAddress;
  365. uint8_t * pucAlignedHeap;
  366. unsigned int _1;
  367. unsigned int _2;
  368. struct BlockLink_t * uxAddress.14_3;
  369. unsigned int _4;
  370. <bb 2> [local count: 1073741824]:
  371. # DEBUG BEGIN_STMT
  372. # DEBUG BEGIN_STMT
  373. # DEBUG BEGIN_STMT
  374. # DEBUG BEGIN_STMT
  375. # DEBUG xTotalHeapSize => 8192
  376. # DEBUG BEGIN_STMT
  377. uxAddress_7 = (size_t) &ucHeap;
  378. # DEBUG uxAddress => uxAddress_7
  379. # DEBUG BEGIN_STMT
  380. _1 = uxAddress_7 & 7;
  381. if (_1 != 0)
  382. goto <bb 3>; [50.00%]
  383. else
  384. goto <bb 4>; [50.00%]
  385. <bb 3> [local count: 536870913]:
  386. # DEBUG BEGIN_STMT
  387. uxAddress_8 = uxAddress_7 + 7;
  388. # DEBUG uxAddress => uxAddress_8
  389. # DEBUG BEGIN_STMT
  390. uxAddress_9 = uxAddress_8 & 4294967288;
  391. # DEBUG uxAddress => uxAddress_9
  392. # DEBUG BEGIN_STMT
  393. _2 = 8192 - uxAddress_9;
  394. xTotalHeapSize_10 = _2 + uxAddress_7;
  395. # DEBUG xTotalHeapSize => xTotalHeapSize_10
  396. <bb 4> [local count: 1073741824]:
  397. # uxAddress_5 = PHI <uxAddress_7(2), uxAddress_9(3)>
  398. # xTotalHeapSize_6 = PHI <8192(2), xTotalHeapSize_10(3)>
  399. # DEBUG xTotalHeapSize => xTotalHeapSize_6
  400. # DEBUG uxAddress => uxAddress_5
  401. # DEBUG BEGIN_STMT
  402. pucAlignedHeap_11 = (uint8_t *) uxAddress_5;
  403. # DEBUG pucAlignedHeap => pucAlignedHeap_11
  404. # DEBUG BEGIN_STMT
  405. xStart.pxNextFreeBlock = pucAlignedHeap_11;
  406. # DEBUG BEGIN_STMT
  407. xStart.xBlockSize = 0;
  408. # DEBUG BEGIN_STMT
  409. uxAddress_15 = uxAddress_5 + xTotalHeapSize_6;
  410. # DEBUG uxAddress => uxAddress_15
  411. # DEBUG BEGIN_STMT
  412. uxAddress_16 = uxAddress_15 + 4294967288;
  413. # DEBUG uxAddress => uxAddress_16
  414. # DEBUG BEGIN_STMT
  415. uxAddress_17 = uxAddress_16 & 4294967288;
  416. # DEBUG uxAddress => uxAddress_17
  417. # DEBUG BEGIN_STMT
  418. uxAddress.14_3 = (struct BlockLink_t *) uxAddress_17;
  419. pxEnd = uxAddress.14_3;
  420. # DEBUG BEGIN_STMT
  421. uxAddress.14_3->xBlockSize = 0;
  422. # DEBUG BEGIN_STMT
  423. uxAddress.14_3->pxNextFreeBlock = 0B;
  424. # DEBUG BEGIN_STMT
  425. # DEBUG pxFirstFreeBlock => pucAlignedHeap_11
  426. # DEBUG BEGIN_STMT
  427. _4 = uxAddress_17 - uxAddress_5;
  428. MEM[(struct BlockLink_t *)pucAlignedHeap_11].xBlockSize = _4;
  429. # DEBUG BEGIN_STMT
  430. MEM[(struct BlockLink_t *)pucAlignedHeap_11].pxNextFreeBlock = uxAddress.14_3;
  431. # DEBUG BEGIN_STMT
  432. xMinimumEverFreeBytesRemaining = _4;
  433. # DEBUG BEGIN_STMT
  434. xFreeBytesRemaining = _4;
  435. # DEBUG BEGIN_STMT
  436. xBlockAllocatedBit = 2147483648;
  437. return;
  438. }
  439. vPortInitialiseBlocks ()
  440. {
  441. <bb 2> [local count: 1073741824]:
  442. # DEBUG BEGIN_STMT
  443. return;
  444. }
  445. xPortGetMinimumEverFreeHeapSize ()
  446. {
  447. size_t _2;
  448. <bb 2> [local count: 1073741824]:
  449. # DEBUG BEGIN_STMT
  450. _2 = xMinimumEverFreeBytesRemaining;
  451. return _2;
  452. }
  453. xPortGetFreeHeapSize ()
  454. {
  455. size_t _2;
  456. <bb 2> [local count: 1073741824]:
  457. # DEBUG BEGIN_STMT
  458. _2 = xFreeBytesRemaining;
  459. return _2;
  460. }
  461. vPortFree (void * pv)
  462. {
  463. uint32_t ulNewBASEPRI;
  464. uint32_t ulNewBASEPRI;
  465. uint8_t * puc;
  466. unsigned int _1;
  467. unsigned int xBlockAllocatedBit.21_2;
  468. unsigned int _3;
  469. struct A_BLOCK_LINK * _4;
  470. unsigned int _5;
  471. unsigned int _6;
  472. unsigned int _7;
  473. unsigned int xFreeBytesRemaining.24_8;
  474. unsigned int _9;
  475. unsigned int xNumberOfSuccessfulFrees.25_10;
  476. unsigned int _11;
  477. <bb 2> [local count: 306783]:
  478. # DEBUG BEGIN_STMT
  479. # DEBUG puc => pv_13(D)
  480. # DEBUG BEGIN_STMT
  481. # DEBUG BEGIN_STMT
  482. if (pv_13(D) != 0B)
  483. goto <bb 3>; [70.00%]
  484. else
  485. goto <bb 10>; [30.00%]
  486. <bb 3> [local count: 214748]:
  487. # DEBUG BEGIN_STMT
  488. puc_15 = pv_13(D) + 4294967288;
  489. # DEBUG puc => puc_15
  490. # DEBUG BEGIN_STMT
  491. # DEBUG pxLink => puc_15
  492. # DEBUG BEGIN_STMT
  493. _1 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  494. xBlockAllocatedBit.21_2 = xBlockAllocatedBit;
  495. _3 = _1 & xBlockAllocatedBit.21_2;
  496. if (_3 == 0)
  497. goto <bb 4>; [50.00%]
  498. else
  499. goto <bb 6>; [50.00%]
  500. <bb 4> [local count: 107374]:
  501. # DEBUG BEGIN_STMT
  502. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  503. # DEBUG BEGIN_STMT
  504. # DEBUG BEGIN_STMT
  505. __asm__ __volatile__(" mov %0, %1
  506. msr basepri, %0
  507. isb
  508. dsb
  509. " : "=r" ulNewBASEPRI_22 : "i" 16 : "memory");
  510. # DEBUG ulNewBASEPRI => ulNewBASEPRI_22
  511. <bb 5> [local count: 1073741823]:
  512. # DEBUG ulNewBASEPRI => NULL
  513. # DEBUG BEGIN_STMT
  514. # DEBUG BEGIN_STMT
  515. # DEBUG BEGIN_STMT
  516. <bb 11> [local count: 1073741824]:
  517. goto <bb 5>; [100.00%]
  518. <bb 6> [local count: 107374]:
  519. # DEBUG BEGIN_STMT
  520. # DEBUG BEGIN_STMT
  521. _4 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].pxNextFreeBlock;
  522. if (_4 != 0B)
  523. goto <bb 7>; [82.57%]
  524. else
  525. goto <bb 9>; [17.43%]
  526. <bb 7> [local count: 88659]:
  527. # DEBUG BEGIN_STMT
  528. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  529. # DEBUG BEGIN_STMT
  530. # DEBUG BEGIN_STMT
  531. __asm__ __volatile__(" mov %0, %1
  532. msr basepri, %0
  533. isb
  534. dsb
  535. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  536. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  537. <bb 8> [local count: 886588623]:
  538. # DEBUG ulNewBASEPRI => NULL
  539. # DEBUG BEGIN_STMT
  540. # DEBUG BEGIN_STMT
  541. # DEBUG BEGIN_STMT
  542. <bb 12> [local count: 886588623]:
  543. goto <bb 8>; [100.00%]
  544. <bb 9> [local count: 18715]:
  545. # DEBUG BEGIN_STMT
  546. # DEBUG BEGIN_STMT
  547. # DEBUG BEGIN_STMT
  548. # DEBUG BEGIN_STMT
  549. _5 = ~xBlockAllocatedBit.21_2;
  550. _6 = _1 & _5;
  551. MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize = _6;
  552. # DEBUG BEGIN_STMT
  553. vTaskSuspendAll ();
  554. # DEBUG BEGIN_STMT
  555. _7 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  556. xFreeBytesRemaining.24_8 = xFreeBytesRemaining;
  557. _9 = _7 + xFreeBytesRemaining.24_8;
  558. xFreeBytesRemaining = _9;
  559. # DEBUG BEGIN_STMT
  560. # DEBUG BEGIN_STMT
  561. prvInsertBlockIntoFreeList (puc_15);
  562. # DEBUG BEGIN_STMT
  563. xNumberOfSuccessfulFrees.25_10 = xNumberOfSuccessfulFrees;
  564. _11 = xNumberOfSuccessfulFrees.25_10 + 1;
  565. xNumberOfSuccessfulFrees = _11;
  566. # DEBUG BEGIN_STMT
  567. xTaskResumeAll ();
  568. <bb 10> [local count: 110750]:
  569. # DEBUG BEGIN_STMT
  570. return;
  571. }
  572. pvPortMalloc (size_t xWantedSize)
  573. {
  574. uint32_t ulNewBASEPRI;
  575. uint32_t ulNewBASEPRI;
  576. void * pvReturn;
  577. struct BlockLink_t * pxNewBlockLink;
  578. struct BlockLink_t * pxPreviousBlock;
  579. struct BlockLink_t * pxBlock;
  580. struct BlockLink_t * pxEnd.0_1;
  581. unsigned int xBlockAllocatedBit.1_2;
  582. unsigned int _3;
  583. unsigned int _4;
  584. unsigned int _5;
  585. unsigned int _6;
  586. unsigned int _7;
  587. unsigned int xFreeBytesRemaining.2_9;
  588. unsigned int _10;
  589. struct A_BLOCK_LINK * _11;
  590. struct BlockLink_t * pxEnd.3_12;
  591. struct A_BLOCK_LINK * _13;
  592. struct A_BLOCK_LINK * _14;
  593. unsigned int _15;
  594. unsigned int pxNewBlockLink.4_16;
  595. unsigned int _17;
  596. unsigned int xFreeBytesRemaining.5_18;
  597. unsigned int _19;
  598. unsigned int _20;
  599. unsigned int xMinimumEverFreeBytesRemaining.7_21;
  600. unsigned int xBlockAllocatedBit.9_22;
  601. unsigned int _23;
  602. unsigned int xNumberOfSuccessfulAllocations.10_24;
  603. unsigned int _25;
  604. unsigned int pvReturn.11_26;
  605. unsigned int _27;
  606. unsigned int _57;
  607. <bb 2> [local count: 231566]:
  608. # DEBUG BEGIN_STMT
  609. # DEBUG BEGIN_STMT
  610. # DEBUG pvReturn => 0B
  611. # DEBUG BEGIN_STMT
  612. vTaskSuspendAll ();
  613. # DEBUG BEGIN_STMT
  614. pxEnd.0_1 = pxEnd;
  615. if (pxEnd.0_1 == 0B)
  616. goto <bb 3>; [17.43%]
  617. else
  618. goto <bb 4>; [82.57%]
  619. <bb 3> [local count: 40362]:
  620. # DEBUG BEGIN_STMT
  621. prvHeapInit ();
  622. <bb 4> [local count: 231566]:
  623. # DEBUG BEGIN_STMT
  624. # DEBUG BEGIN_STMT
  625. xBlockAllocatedBit.1_2 = xBlockAllocatedBit;
  626. _3 = xBlockAllocatedBit.1_2 & xWantedSize_39(D);
  627. if (_3 == 0)
  628. goto <bb 5>; [83.25%]
  629. else
  630. goto <bb 22>; [16.75%]
  631. <bb 5> [local count: 192779]:
  632. # DEBUG BEGIN_STMT
  633. _4 = xWantedSize_39(D) + 4294967295;
  634. if (_4 <= 4294967286)
  635. goto <bb 6>; [71.00%]
  636. else
  637. goto <bb 22>; [29.00%]
  638. <bb 6> [local count: 136873]:
  639. # DEBUG BEGIN_STMT
  640. xWantedSize_40 = xWantedSize_39(D) + 8;
  641. # DEBUG xWantedSize => xWantedSize_40
  642. # DEBUG BEGIN_STMT
  643. _5 = xWantedSize_40 & 7;
  644. if (_5 != 0)
  645. goto <bb 7>; [50.00%]
  646. else
  647. goto <bb 8>; [50.00%]
  648. <bb 7> [local count: 68436]:
  649. # DEBUG BEGIN_STMT
  650. _6 = xWantedSize_40 & 4294967288;
  651. _7 = _6 + 8;
  652. if (_7 > xWantedSize_40)
  653. goto <bb 8>; [71.00%]
  654. else
  655. goto <bb 22>; [29.00%]
  656. <bb 8> [local count: 117026]:
  657. # xWantedSize_28 = PHI <_7(7), xWantedSize_40(6)>
  658. # DEBUG xWantedSize => xWantedSize_28
  659. # DEBUG BEGIN_STMT
  660. if (xWantedSize_28 != 0)
  661. goto <bb 9>; [71.00%]
  662. else
  663. goto <bb 22>; [29.00%]
  664. <bb 9> [local count: 83089]:
  665. xFreeBytesRemaining.2_9 = xFreeBytesRemaining;
  666. if (xFreeBytesRemaining.2_9 >= xWantedSize_28)
  667. goto <bb 10>; [71.00%]
  668. else
  669. goto <bb 22>; [29.00%]
  670. <bb 10> [local count: 58993]:
  671. # DEBUG BEGIN_STMT
  672. # DEBUG pxPreviousBlock => &xStart
  673. # DEBUG BEGIN_STMT
  674. pxBlock_41 = xStart.pxNextFreeBlock;
  675. # DEBUG pxBlock => pxBlock_41
  676. # DEBUG BEGIN_STMT
  677. <bb 11> [local count: 551465]:
  678. # pxBlock_29 = PHI <pxBlock_41(10), _11(28)>
  679. # pxPreviousBlock_30 = PHI <&xStart(10), pxBlock_29(28)>
  680. # DEBUG pxPreviousBlock => pxPreviousBlock_30
  681. # DEBUG pxBlock => pxBlock_29
  682. # DEBUG BEGIN_STMT
  683. _10 = pxBlock_29->xBlockSize;
  684. if (_10 < xWantedSize_28)
  685. goto <bb 12>; [94.50%]
  686. else
  687. goto <bb 13>; [5.50%]
  688. <bb 12> [local count: 521134]:
  689. _11 = pxBlock_29->pxNextFreeBlock;
  690. if (_11 != 0B)
  691. goto <bb 28>; [94.50%]
  692. else
  693. goto <bb 13>; [5.50%]
  694. <bb 28> [local count: 492472]:
  695. goto <bb 11>; [100.00%]
  696. <bb 13> [local count: 58993]:
  697. # _57 = PHI <_10(11), _10(12)>
  698. # pxBlock_54 = PHI <pxBlock_29(11), pxBlock_29(12)>
  699. # pxPreviousBlock_8 = PHI <pxPreviousBlock_30(11), pxPreviousBlock_30(12)>
  700. # DEBUG BEGIN_STMT
  701. pxEnd.3_12 = pxEnd;
  702. if (pxEnd.3_12 != pxBlock_54)
  703. goto <bb 14>; [85.10%]
  704. else
  705. goto <bb 22>; [14.90%]
  706. <bb 14> [local count: 50203]:
  707. # DEBUG BEGIN_STMT
  708. _13 = pxPreviousBlock_8->pxNextFreeBlock;
  709. pvReturn_42 = _13 + 8;
  710. # DEBUG pvReturn => pvReturn_42
  711. # DEBUG BEGIN_STMT
  712. _14 = pxBlock_54->pxNextFreeBlock;
  713. pxPreviousBlock_8->pxNextFreeBlock = _14;
  714. # DEBUG BEGIN_STMT
  715. _15 = _57 - xWantedSize_28;
  716. if (_15 > 16)
  717. goto <bb 15>; [50.00%]
  718. else
  719. goto <bb 19>; [50.00%]
  720. <bb 15> [local count: 25102]:
  721. # DEBUG BEGIN_STMT
  722. pxNewBlockLink_44 = pxBlock_54 + xWantedSize_28;
  723. # DEBUG pxNewBlockLink => pxNewBlockLink_44
  724. # DEBUG BEGIN_STMT
  725. pxNewBlockLink.4_16 = (unsigned int) pxNewBlockLink_44;
  726. _17 = pxNewBlockLink.4_16 & 7;
  727. if (_17 != 0)
  728. goto <bb 16>; [67.00%]
  729. else
  730. goto <bb 18>; [33.00%]
  731. <bb 16> [local count: 16818]:
  732. # DEBUG BEGIN_STMT
  733. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  734. # DEBUG BEGIN_STMT
  735. # DEBUG BEGIN_STMT
  736. __asm__ __volatile__(" mov %0, %1
  737. msr basepri, %0
  738. isb
  739. dsb
  740. " : "=r" ulNewBASEPRI_55 : "i" 16 : "memory");
  741. # DEBUG ulNewBASEPRI => ulNewBASEPRI_55
  742. <bb 17> [local count: 168180375]:
  743. # DEBUG ulNewBASEPRI => NULL
  744. # DEBUG BEGIN_STMT
  745. # DEBUG BEGIN_STMT
  746. # DEBUG BEGIN_STMT
  747. <bb 26> [local count: 168180375]:
  748. goto <bb 17>; [100.00%]
  749. <bb 18> [local count: 8283]:
  750. # DEBUG BEGIN_STMT
  751. # DEBUG BEGIN_STMT
  752. pxNewBlockLink_44->xBlockSize = _15;
  753. # DEBUG BEGIN_STMT
  754. pxBlock_54->xBlockSize = xWantedSize_28;
  755. # DEBUG BEGIN_STMT
  756. prvInsertBlockIntoFreeList (pxNewBlockLink_44);
  757. <bb 19> [local count: 33385]:
  758. # DEBUG BEGIN_STMT
  759. # DEBUG BEGIN_STMT
  760. xFreeBytesRemaining.5_18 = xFreeBytesRemaining;
  761. _19 = pxBlock_54->xBlockSize;
  762. _20 = xFreeBytesRemaining.5_18 - _19;
  763. xFreeBytesRemaining = _20;
  764. # DEBUG BEGIN_STMT
  765. xMinimumEverFreeBytesRemaining.7_21 = xMinimumEverFreeBytesRemaining;
  766. if (_20 < xMinimumEverFreeBytesRemaining.7_21)
  767. goto <bb 20>; [50.00%]
  768. else
  769. goto <bb 21>; [50.00%]
  770. <bb 20> [local count: 16693]:
  771. # DEBUG BEGIN_STMT
  772. xMinimumEverFreeBytesRemaining = _20;
  773. <bb 21> [local count: 33385]:
  774. # DEBUG BEGIN_STMT
  775. # DEBUG BEGIN_STMT
  776. xBlockAllocatedBit.9_22 = xBlockAllocatedBit;
  777. _23 = _19 | xBlockAllocatedBit.9_22;
  778. pxBlock_54->xBlockSize = _23;
  779. # DEBUG BEGIN_STMT
  780. pxBlock_54->pxNextFreeBlock = 0B;
  781. # DEBUG BEGIN_STMT
  782. xNumberOfSuccessfulAllocations.10_24 = xNumberOfSuccessfulAllocations;
  783. _25 = xNumberOfSuccessfulAllocations.10_24 + 1;
  784. xNumberOfSuccessfulAllocations = _25;
  785. <bb 22> [local count: 214748]:
  786. # pvReturn_31 = PHI <0B(4), 0B(9), 0B(8), 0B(13), pvReturn_42(21), 0B(7), 0B(5)>
  787. # DEBUG xWantedSize => NULL
  788. # DEBUG pvReturn => pvReturn_31
  789. # DEBUG BEGIN_STMT
  790. # DEBUG BEGIN_STMT
  791. # DEBUG BEGIN_STMT
  792. xTaskResumeAll ();
  793. # DEBUG BEGIN_STMT
  794. pvReturn.11_26 = (unsigned int) pvReturn_31;
  795. _27 = pvReturn.11_26 & 7;
  796. if (_27 != 0)
  797. goto <bb 23>; [50.00%]
  798. else
  799. goto <bb 25>; [50.00%]
  800. <bb 23> [local count: 107374]:
  801. # DEBUG BEGIN_STMT
  802. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  803. # DEBUG BEGIN_STMT
  804. # DEBUG BEGIN_STMT
  805. __asm__ __volatile__(" mov %0, %1
  806. msr basepri, %0
  807. isb
  808. dsb
  809. " : "=r" ulNewBASEPRI_56 : "i" 16 : "memory");
  810. # DEBUG ulNewBASEPRI => ulNewBASEPRI_56
  811. <bb 24> [local count: 1073741824]:
  812. # DEBUG ulNewBASEPRI => NULL
  813. # DEBUG BEGIN_STMT
  814. # DEBUG BEGIN_STMT
  815. # DEBUG BEGIN_STMT
  816. <bb 27> [local count: 1073741824]:
  817. goto <bb 24>; [100.00%]
  818. <bb 25> [local count: 107374]:
  819. # DEBUG BEGIN_STMT
  820. # DEBUG BEGIN_STMT
  821. return pvReturn_31;
  822. }