[edk2-devel] [PATCH] UnitTestFrameworkPkg: Add UnitTestPeiServicesTablePointerLib

Ni, Ray ray.ni at intel.com
Mon Jun 5 03:26:08 UTC 2023


> +/**
> +  Allocate Buffer Or Clear Buffer For Global Data.
> +**/
> +VOID
> +AllocateBufferOrClearBufferForGlobalData (
> +  VOID
> +  )
> +{
> +  ZeroMem (&mPrivateData, sizeof (mPrivateData));
> +  if (!PSInitDone) {

1. "PSInitDone" doesn't follow edk2 coding style.


> +    mHobBuffer = AllocatePages (EFI_SIZE_TO_PAGES (MAX_HOB_SIZE));

2. If the size to allocate is fixed, can you just declare in global variable instead of allocating?

3. Can you evaluate all the allocations and try to avoid them? This helps to remove the dep on MemoryAllocationLib.

3. "CallbackNotifyList" is not initialized. 

Thanks,
Ray


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105689): https://edk2.groups.io/g/devel/message/105689
Mute This Topic: https://groups.io/mt/99256644/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list