Emulator Thunk to abstract OS services from pure EFI code\r
\r
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>\r
+ Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
#include <Library/BaseLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/DebugLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
\r
#include <Protocol/EmuIoThunk.h>\r
\r
-#include <stdlib.h>\r
-\r
\r
#define EMU_IO_THUNK_PROTOCOL_DATA_SIGNATURE SIGNATURE_32('E','m','u','T')\r
\r
}\r
\r
Instance = 0;\r
- StartString = malloc (StrSize (ConfigString));\r
+ StartString = AllocatePool (StrSize (ConfigString));\r
StrCpy (StartString, ConfigString);\r
while (*StartString != '\0') {\r
\r
SubString++;\r
}\r
\r
- Private = malloc (sizeof (EMU_IO_THUNK_PROTOCOL_DATA));\r
+ Private = AllocatePool (sizeof (EMU_IO_THUNK_PROTOCOL_DATA));\r
if (Private == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r