/* User defined marking function */
/* It should work like this:
* foreach (ref in GC references in the are structure pointed to by ADDR)
- * *ref = mark_func (*ref)
+ * mark_func (ref)
*/
-typedef void *(*MonoGCCopyFunc) (void *addr);
-typedef void (*MonoGCMarkFunc) (void *addr, MonoGCCopyFunc mark_func);
+typedef void (*MonoGCMarkFunc) (void **addr);
+typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func);
/* Create a descriptor with a user defined marking function */
-void *mono_gc_make_root_descr_user (MonoGCMarkFunc marker);
+void *mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker);
/* desc is the result from mono_gc_make_descr*. A NULL value means
* all the words might contain GC pointers.
void* mono_gc_alloc_pinned_obj (MonoVTable *vtable, size_t size) MONO_INTERNAL;
void* mono_gc_alloc_obj (MonoVTable *vtable, size_t size) MONO_INTERNAL;
-void* mono_gc_alloc_vector (MonoVTable *vtable, size_t size, mono_array_size_t max_length) MONO_INTERNAL;
-void* mono_gc_alloc_array (MonoVTable *vtable, size_t size, mono_array_size_t max_length, mono_array_size_t bounds_size) MONO_INTERNAL;
+void* mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length) MONO_INTERNAL;
+void* mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uintptr_t bounds_size) MONO_INTERNAL;
+void* mono_gc_alloc_string (MonoVTable *vtable, size_t size, gint32 len) MONO_INTERNAL;
void* mono_gc_make_descr_for_string (gsize *bitmap, int numbits) MONO_INTERNAL;
void* mono_gc_make_descr_for_object (gsize *bitmap, int numbits, size_t obj_size) MONO_INTERNAL;
void* mono_gc_make_descr_for_array (int vector, gsize *elem_bitmap, int numbits, size_t elem_size) MONO_INTERNAL;
void mono_gc_finalize_threadpool_threads (void) MONO_INTERNAL;
/* fast allocation support */
+
+/* Accessible using mono_marshal_wrapper_info_from_wrapper () */
+typedef struct {
+ int alloc_type;
+} AllocatorWrapperInfo;
+
MonoMethod* mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box) MONO_INTERNAL;
MonoMethod* mono_gc_get_managed_array_allocator (MonoVTable *vtable, int rank) MONO_INTERNAL;
-int mono_gc_get_managed_allocator_type (MonoMethod *managed_alloc) MONO_INTERNAL;
MonoMethod *mono_gc_get_managed_allocator_by_type (int atype) MONO_INTERNAL;
guint32 mono_gc_get_managed_allocator_types (void) MONO_INTERNAL;
or -1 if not applicable. */
int mono_gc_get_suspend_signal (void) MONO_INTERNAL;
+typedef void* (*MonoGCLockedCallbackFunc) (void *data);
+
+void* mono_gc_invoke_with_gc_lock (MonoGCLockedCallbackFunc func, void *data) MONO_INTERNAL;
+
+#ifdef HAVE_SGEN_GC
+int mono_gc_get_los_limit (void) MONO_INTERNAL;
+#endif
+
#endif /* __MONO_METADATA_GC_INTERNAL_H__ */