diff --git a/UefiTestingPkg/FunctionalSystemTests/MemmapAndMatTestApp/MemmapAndMatTestApp.c b/UefiTestingPkg/FunctionalSystemTests/MemmapAndMatTestApp/MemmapAndMatTestApp.c index 30d372ff00..91cb8b27e1 100644 --- a/UefiTestingPkg/FunctionalSystemTests/MemmapAndMatTestApp/MemmapAndMatTestApp.c +++ b/UefiTestingPkg/FunctionalSystemTests/MemmapAndMatTestApp/MemmapAndMatTestApp.c @@ -605,6 +605,8 @@ InitializeTestEnvironment ( return EFI_UNSUPPORTED; } + // Allocate extra memory in case this allocation caused the memory to change. + MapSize += SIZE_1KB; EfiMemoryMap = AllocateZeroPool (MapSize); if (!EfiMemoryMap) { return EFI_OUT_OF_RESOURCES;