mirror_edk2/MdeModulePkg/Core
jgong5 38c7df9848 Avoid DEBUG_CLEAR_MEMORY clearing MemoryMap internal structure.
In CoreFreePages(), the following sequence might break the MemoryMap internal structure:
CoreConvertPages() -> CoreFreeMemoryMapStack() -> AllocateMemoryMapEntry() -> CoreAllocatePoolPages() -> DEBUG_CLEAR_MEMORY()

CoreConvertPages() will call CoreFreeMemoryMapStack() after it adds the freed memory range, so the latter might use the just freed memory range when calling AllocateMemoryMapEntry(). But CoreFreePages() will call DEBUG_CLEAR_MEMORY() after CoreConvertPages(). This might clear up the memory map entry structure.

The fix calls DEBUG_CLEAR_MEMORY() just after freed memory range is added in CoreConvertPages(), which is safe.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10335 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-03 05:34:16 +00:00
..
Dxe Avoid DEBUG_CLEAR_MEMORY clearing MemoryMap internal structure. 2010-04-03 05:34:16 +00:00
DxeIplPeim roll back IDT_ENTRY counter to 32 2010-03-11 02:04:04 +00:00
Pei Fixed a bug in LMFA code 2010-03-12 04:35:00 +00:00
PiSmmCore Change BufferSize from UINTN * to UINTN to eliminate pointer to pointer in SmmCore for security consideration. 2010-03-21 04:17:16 +00:00
RuntimeDxe 1. Correct File header to ## @file 2010-02-24 00:21:16 +00:00