From c217506815e1a769ef9ac3ab6dbf3e68ba5f00e0 Mon Sep 17 00:00:00 2001 From: andrewfish Date: Fri, 24 Jun 2011 14:48:38 +0000 Subject: [InOSEmPkg] Add OS malloc and free to the Thunk. Added OS malloc and free so we can make MemoryAllocationLib instance that uses OS guard malloc. This will allow all the debug support built into the OS for finding malloc bugs to be used with a driver in the emulator. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11883 6f19259b-4bc3-4df7-8a09-765794883524 --- InOsEmuPkg/Include/Protocol/EmuThunk.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'InOsEmuPkg/Include') diff --git a/InOsEmuPkg/Include/Protocol/EmuThunk.h b/InOsEmuPkg/Include/Protocol/EmuThunk.h index ed4df3a942..6c1190c141 100644 --- a/InOsEmuPkg/Include/Protocol/EmuThunk.h +++ b/InOsEmuPkg/Include/Protocol/EmuThunk.h @@ -78,6 +78,18 @@ BOOLEAN ); +typedef +VOID * +(EFIAPI *EMU_OS_MALLOC) ( + IN UINTN Size + ); + +typedef +VOID +(EFIAPI *EMU_OS_FREE) ( + IN VOID *Ptr + ); + typedef EFI_STATUS @@ -205,6 +217,13 @@ struct _EMU_THUNK_PROTOCOL { EMU_READ_STD_IN ReadStdIn; EMU_POLL_STD_IN PollStdIn; + // + // Map OS malloc/free so we can use OS based guard malloc + // + EMU_OS_MALLOC Malloc; + EMU_OS_FREE Free; + + /// /// PE/COFF loader hooks to get symbols loaded /// -- cgit v1.2.3