Make the EdkMoudlePkg build by allocate mCallbackFnTable at runtime as PCD_TOTAL_TOKE...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Jun 2006 07:03:06 +0000 (07:03 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Jun 2006 07:03:06 +0000 (07:03 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@390 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Universal/PCD/Dxe/Service.c

index bccd0a6..00437f1 100644 (file)
@@ -24,7 +24,7 @@ Module Name: Service.c
 \r
 PCD_DATABASE * mPcdDatabase;\r
 \r
-LIST_ENTRY mCallbackFnTable[PCD_TOTAL_TOKEN_NUMBER];\r
+LIST_ENTRY *mCallbackFnTable;\r
 \r
 VOID *\r
 GetWorker (\r
@@ -310,6 +310,11 @@ BuildPcdDxeDataBase (
   //\r
   // Initialized the Callback Function Table\r
   //\r
+\r
+  if (PCD_TOTAL_TOKEN_NUMBER != 0) {\r
+    mCallbackFnTable = AllocateZeroPool (PCD_TOTAL_TOKEN_NUMBER);\r
+  }\r
+  \r
   for (Idx = 0; Idx < PCD_TOTAL_TOKEN_NUMBER; Idx++) {\r
     InitializeListHead (&mCallbackFnTable[Idx]);\r
   }\r