Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Mon, 24 Jan 2005 14:49:34 +0000 (14:49 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Mon, 24 Jan 2005 14:49:34 +0000 (14:49 -0000)
* gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
if you don't want the GC to run.

svn path=/trunk/mono/; revision=39415

mono/metadata/ChangeLog
mono/metadata/gc.c

index 12ba8b9630b21f1488ebccb35190605dd41f08ef..12aff3f6919eaeeb0fb9cf7440623d2895ea88de 100644 (file)
@@ -1,4 +1,9 @@
 
+Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
+
+       * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
+       if you don't want the GC to run.
+
 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
 
        * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
index bb894adc64e441fbf4255b4f40fcca359dd8b3c7..37d9615f5bb730ef9060f2b375a95fccc1db5229 100644 (file)
@@ -39,10 +39,6 @@ extern int __imp_GC_finalize_on_demand;
 #define GC_finalize_on_demand __imp_GC_finalize_on_demand
 #endif
 
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-#include <valgrind/memcheck.h>
-#endif
-
 static int finalize_slot = -1;
 
 static gboolean gc_disabled = FALSE;
@@ -675,20 +671,6 @@ mono_gc_warning (char *msg, GC_word arg)
        mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_GC, msg, (unsigned long)arg);
 }
 
-static gboolean
-mono_running_on_valgrind (void)
-{
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-               if (RUNNING_ON_VALGRIND)
-                       return TRUE;
-               else
-                       return FALSE;
-#else
-               return FALSE;
-#endif
-}
-
-
 void mono_gc_init (void)
 {
        InitializeCriticalSection (&handle_section);
@@ -715,20 +697,6 @@ void mono_gc_init (void)
                return;
        }
        
-       /* valgrind does not play nicely with the GC,
-        * so, turn it off when we are under vg.
-        */
-       if (mono_running_on_valgrind ()) {
-               /* valgrind doesnt like g_warning for some reason... */
-               printf ("You are running under valgrind. Currently, valgrind does "
-                          "not support the GC. This program will run with the GC "
-                          "turned off. Your program may take up a fair amount of "
-                          "memory. Also, finalizers will not be run.\n");
-               
-               gc_disabled = TRUE;
-               return;
-       }
-       
        finalizer_event = CreateEvent (NULL, FALSE, FALSE, NULL);
        pending_done_event = CreateEvent (NULL, TRUE, FALSE, NULL);
        shutdown_event = CreateEvent (NULL, TRUE, FALSE, NULL);