summaryrefslogtreecommitdiff
path: root/InOsEmuPkg/Include
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-24 14:48:38 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-24 14:48:38 +0000
commitc217506815e1a769ef9ac3ab6dbf3e68ba5f00e0 (patch)
treee3e6b53f66766445c59f75f1736e654aa827d874 /InOsEmuPkg/Include
parent54e0b04c74a1e55ccfd3b428415eb419b975de8b (diff)
downloadedk2-platforms-c217506815e1a769ef9ac3ab6dbf3e68ba5f00e0.tar.xz
[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
Diffstat (limited to 'InOsEmuPkg/Include')
-rw-r--r--InOsEmuPkg/Include/Protocol/EmuThunk.h19
1 files changed, 19 insertions, 0 deletions
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
///