2 * null-gc.c: GC implementation using malloc: will leak everything, just for testing.
8 #include <mono/metadata/mono-gc.h>
9 #include <mono/metadata/gc-internal.h>
14 mono_gc_collect (int generation
)
19 mono_gc_max_generation (void)
25 mono_gc_get_generation (MonoObject
*object
)
31 mono_gc_collection_count (int generation
)
37 mono_gc_add_memory_pressure (gint64 value
)
41 /* maybe track the size, not important, though */
43 mono_gc_get_used_size (void)
49 mono_gc_get_heap_size (void)
55 mono_gc_disable (void)
65 mono_gc_is_gc_thread (void)
71 mono_gc_register_thread (void *baseptr
)
77 mono_object_is_alive (MonoObject
* o
)
83 mono_gc_enable_events (void)
88 mono_gc_weak_link_add (void **link_addr
, MonoObject
*obj
)
94 mono_gc_weak_link_remove (void **link_addr
)
100 mono_gc_weak_link_get (void **link_addr
)
106 mono_gc_make_descr_from_bitmap (gsize
*bitmap
, int numbits
)
112 mono_gc_alloc_fixed (size_t size
, void *descr
)
114 return g_malloc0 (size
);
118 mono_gc_free_fixed (void* addr
)
124 mono_gc_wbarrier_set_field (MonoObject
*obj
, gpointer field_ptr
, MonoObject
* value
)
126 *(void**)field_ptr
= value
;
130 mono_gc_wbarrier_set_arrayref (MonoArray
*arr
, gpointer slot_ptr
, MonoObject
* value
)
132 *(void**)slot_ptr
= value
;
136 mono_gc_wbarrier_arrayref_copy (MonoArray
*arr
, gpointer slot_ptr
, int count
)
138 /* no need to do anything */
142 mono_gc_wbarrier_generic_store (gpointer ptr
, MonoObject
* value
)
144 *(void**)ptr
= value
;
148 mono_gc_wbarrier_value_copy (gpointer dest
, gpointer src
, int count
, MonoClass
*klass
)