Author: joncham
Date: 2007-01-11 15:00:25 -0500 (Thu, 11 Jan 2007)
New Revision: 70879
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/icall-def.h
trunk/mono/mono/metadata/marshal.c
trunk/mono/mono/metadata/marshal.h
Log:
2007-01-11 Jonathan Chambers <[EMAIL PROTECTED]>
* marshal.c, marshal.h, icall-def.h: Implement
Marshal.ReAllocCoTaskMem.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2007-01-11 19:48:05 UTC (rev 70878)
+++ trunk/mono/mono/metadata/ChangeLog 2007-01-11 20:00:25 UTC (rev 70879)
@@ -1,4 +1,8 @@
+2007-01-11 Jonathan Chambers <[EMAIL PROTECTED]>
+ * marshal.c, marshal.h, icall-def.h: Implement
+ Marshal.ReAllocCoTaskMem.
+
Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <[EMAIL PROTECTED]>
* marshal.c: memory retention fixes: use the proper
Modified: trunk/mono/mono/metadata/icall-def.h
===================================================================
--- trunk/mono/mono/metadata/icall-def.h 2007-01-11 19:48:05 UTC (rev
70878)
+++ trunk/mono/mono/metadata/icall-def.h 2007-01-11 20:00:25 UTC (rev
70879)
@@ -579,6 +579,7 @@
ICALL(MARSHAL_20, "PtrToStructure(intptr,System.Type)",
ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type)
ICALL(MARSHAL_21, "PtrToStructure(intptr,object)",
ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure)
ICALL(MARSHAL_22, "QueryInterface",
ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface)
+ICALL(MARSHAL_43, "ReAllocCoTaskMem",
ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem)
ICALL(MARSHAL_23, "ReAllocHGlobal", mono_marshal_realloc)
ICALL(MARSHAL_24, "ReadByte",
ves_icall_System_Runtime_InteropServices_Marshal_ReadByte)
ICALL(MARSHAL_25, "ReadInt16",
ves_icall_System_Runtime_InteropServices_Marshal_ReadInt16)
Modified: trunk/mono/mono/metadata/marshal.c
===================================================================
--- trunk/mono/mono/metadata/marshal.c 2007-01-11 19:48:05 UTC (rev 70878)
+++ trunk/mono/mono/metadata/marshal.c 2007-01-11 20:00:25 UTC (rev 70879)
@@ -10013,6 +10013,18 @@
#endif
}
+gpointer
+ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem (gpointer
ptr, int size)
+{
+ MONO_ARCH_SAVE_REGS;
+
+#ifdef PLATFORM_WIN32
+ return CoTaskMemRealloc (ptr, size);
+#else
+ return g_try_realloc (ptr, (gulong)size);
+#endif
+}
+
void*
ves_icall_System_Runtime_InteropServices_Marshal_UnsafeAddrOfPinnedArrayElement
(MonoArray *arrayobj, int index)
{
Modified: trunk/mono/mono/metadata/marshal.h
===================================================================
--- trunk/mono/mono/metadata/marshal.h 2007-01-11 19:48:05 UTC (rev 70878)
+++ trunk/mono/mono/metadata/marshal.h 2007-01-11 20:00:25 UTC (rev 70879)
@@ -366,6 +366,9 @@
void
ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem (void *ptr)
MONO_INTERNAL;
+gpointer
+ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem (gpointer
ptr, int size) MONO_INTERNAL;
+
void*
ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal (int size)
MONO_INTERNAL;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches