]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove SafeFreePool from MemoryAllocationLib as this API's name is misleading. Its...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 30 Oct 2008 07:31:31 +0000 (07:31 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 30 Oct 2008 07:31:31 +0000 (07:31 +0000)
It is recommended that module writer should keep track how a pointer is allocated and free it after use.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6305 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/MemoryAllocationLib.h
MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c
MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c

index 76a9f8a564f2bf70b4d0b147160a78ab0951450b..2e8780b75035f7a17b18a4366572dd63a8e8af51 100644 (file)
@@ -383,18 +383,4 @@ FreePool (
   IN VOID   *Buffer\r
   );\r
 \r
-/**\r
-  Frees buffer that were previously allocated with one of the\r
-  memory allocation functions in the Memory Allocation Library.\r
-\r
-  @param  Buffer                Pointer to the buffer of pages\r
-                                to free.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SafeFreePool (\r
-  IN VOID   *Buffer\r
-  );\r
-\r
 #endif\r
index f937369cc77093d0af31290dc7c5a2a27c0caddb..5df1ce6cfbf67580cad354d461e6742331716196 100644 (file)
@@ -650,22 +650,3 @@ FreePool (
 }\r
 \r
 \r
-/**\r
-  Frees buffer that were previously allocated with one of the\r
-  memory allocation functions in the Memory Allocation Library.\r
-\r
-  @param  Buffer                Pointer to the buffer of pages\r
-                                to free.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SafeFreePool (\r
-  IN VOID   *Buffer\r
-  )\r
-{\r
-  //\r
-  // PEI phase does not support to free pool, so leave it as NOP.\r
-  //\r
-}\r
-\r
index 1c1c879a5fbc1c2dea42564cced980166cea62ab..d4ac3b86e6e2bcc0c5f7e251a69a7b6433eff880 100644 (file)
@@ -667,23 +667,3 @@ FreePool (
   ASSERT_EFI_ERROR (Status);\r
 }\r
 \r
-\r
-/**\r
-  Frees buffer that were previously allocated with one of the\r
-  memory allocation functions in the Memory Allocation Library.\r
-\r
-  @param  Buffer                Pointer to the buffer of pages\r
-                                to free.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-SafeFreePool (\r
-  IN VOID   *Buffer\r
-  )\r
-{\r
-  if (Buffer != NULL) {\r
-    FreePool (Buffer);\r
-  }\r
-}\r
-\r