- We need to invalidate the selection area when we replace the
[mono-project.git] / mono / metadata / null-gc.c
blob50671abdfb943292148242f7f9498954cacde0f7
1 /*
2 * null-gc.c: GC implementation using malloc: will leak everything, just for testing.
4 */
6 #include "config.h"
7 #include <glib.h>
8 #include <mono/metadata/mono-gc.h>
9 #include <mono/metadata/gc-internal.h>
11 #ifdef HAVE_NULL_GC
13 void
14 mono_gc_collect (int generation)
18 int
19 mono_gc_max_generation (void)
21 return 0;
24 int
25 mono_gc_get_generation (MonoObject *object)
27 return 0;
30 int
31 mono_gc_collection_count (int generation)
33 return 0;
36 void
37 mono_gc_add_memory_pressure (gint64 value)
41 /* maybe track the size, not important, though */
42 gint64
43 mono_gc_get_used_size (void)
45 return 1024*1024;
48 gint64
49 mono_gc_get_heap_size (void)
51 return 2*1024*1024;
54 void
55 mono_gc_disable (void)
59 void
60 mono_gc_enable (void)
64 gboolean
65 mono_gc_is_gc_thread (void)
67 return TRUE;
70 gboolean
71 mono_gc_register_thread (void *baseptr)
73 return TRUE;
76 gboolean
77 mono_object_is_alive (MonoObject* o)
79 return TRUE;
82 void
83 mono_gc_enable_events (void)
87 void
88 mono_gc_weak_link_add (void **link_addr, MonoObject *obj)
90 *link_addr = obj;
93 void
94 mono_gc_weak_link_remove (void **link_addr)
96 *link_addr = NULL;
99 MonoObject*
100 mono_gc_weak_link_get (void **link_addr)
102 return *link_addr;
105 void*
106 mono_gc_make_descr_from_bitmap (gsize *bitmap, int numbits)
108 return NULL;
111 void*
112 mono_gc_alloc_fixed (size_t size, void *descr)
114 return g_malloc0 (size);
117 void
118 mono_gc_free_fixed (void* addr)
120 g_free (addr);
123 void
124 mono_gc_wbarrier_set_field (MonoObject *obj, gpointer field_ptr, MonoObject* value)
126 *(void**)field_ptr = value;
129 void
130 mono_gc_wbarrier_set_arrayref (MonoArray *arr, gpointer slot_ptr, MonoObject* value)
132 *(void**)slot_ptr = value;
135 void
136 mono_gc_wbarrier_arrayref_copy (MonoArray *arr, gpointer slot_ptr, int count)
138 /* no need to do anything */
141 void
142 mono_gc_wbarrier_generic_store (gpointer ptr, MonoObject* value)
144 *(void**)ptr = value;
147 void
148 mono_gc_wbarrier_value_copy (gpointer dest, gpointer src, int count, MonoClass *klass)
152 #endif