[2020-02] Fix leak in assembly-specific dllmap lookups (#21053)
[mono-project.git] / mono / metadata / marshal-windows-uwp.c
blob4b2ed103acbd59211836bab3f4137d7cbede582c
1 /**
2 * \file
3 * UWP marshal support for Mono.
5 * Copyright 2016 Microsoft
6 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
7 */
8 #include <config.h>
9 #include <glib.h>
10 #include "mono/utils/mono-compiler.h"
12 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
14 #include <windows.h>
15 #include "mono/metadata/marshal-windows-internals.h"
17 void *
18 mono_marshal_alloc_hglobal (size_t size)
20 return HeapAlloc (GetProcessHeap (), 0, size);
23 gpointer
24 mono_marshal_realloc_hglobal (gpointer ptr, size_t size)
26 return HeapReAlloc (GetProcessHeap (), 0, ptr, size);
29 void
30 mono_marshal_free_hglobal (gpointer ptr)
32 HeapFree (GetProcessHeap (), 0, ptr);
35 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
37 MONO_EMPTY_SOURCE_FILE (marshal_windows_uwp);
38 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */