Memory leak !? #6483
Replies: 3 comments
-
I’m interested in this topic as well and look forward to seeing more discussion. |
Beta Was this translation helpful? Give feedback.
-
@anandhkrishna @r1chard-lyu , I believe the answer here is that this is not a memory leak because the HOB list itself is not covered in a memory allocation HOB, so DXE Core does not see it as allocated memory, but part of free memory. That is why it must be relocated and tracked as allocated memory in DXE, so that it is not stomped on. See edk2/MdeModulePkg/Core/Pei/Hob/Hob.c Lines 104 to 116 in bff5093 edk2/MdeModulePkg/Core/Dxe/Gcd/Gcd.c Lines 2841 to 2845 in 5158b59 |
Beta Was this translation helpful? Give feedback.
-
@os-d Thank you for the detailed explanation. I understand now! |
Beta Was this translation helpful? Give feedback.
-
why we didn't free the hob memory here , since the Hobs are moved to system memory here
Beta Was this translation helpful? Give feedback.
All reactions