-/*
- * mini-gc.c: GC interface for the mono JIT
+/**
+ * \file
+ * GC interface for the mono JIT
*
* Author:
* Zoltan Varga (vargaz@gmail.com)
} else {
tls->unwind_state.valid = FALSE;
}
- tls->unwind_state.unwind_data [MONO_UNWIND_DATA_JIT_TLS] = mono_native_tls_get_value (mono_jit_tls_id);
+ tls->unwind_state.unwind_data [MONO_UNWIND_DATA_JIT_TLS] = mono_tls_get_jit_tls ();
tls->unwind_state.unwind_data [MONO_UNWIND_DATA_DOMAIN] = mono_domain_get ();
}
* Debugging aid to control the number of frames scanned precisely
*/
if (!precise_frame_limit_inited) {
- if (g_getenv ("MONO_PRECISE_COUNT"))
- precise_frame_limit = atoi (g_getenv ("MONO_PRECISE_COUNT"));
+ char *mono_precise_count = g_getenv ("MONO_PRECISE_COUNT");
+ if (mono_precise_count) {
+ precise_frame_limit = atoi (mono_precise_count);
+ g_free (mono_precise_count);
+ }
precise_frame_limit_inited = TRUE;
}
static int precise_count;
precise_count ++;
- if (g_getenv ("MONO_GCMAP_COUNT")) {
- if (precise_count == atoi (g_getenv ("MONO_GCMAP_COUNT")))
+ char *mono_gcmap_count = g_getenv ("MONO_GCMAP_COUNT");
+ if (mono_gcmap_count) {
+ int count = atoi (mono_gcmap_count);
+ g_free (mono_gcmap_count);
+ if (precise_count == count)
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
- if (precise_count > atoi (g_getenv ("MONO_GCMAP_COUNT")))
+ if (precise_count > count)
return;
}
}
exit (1);
}
g_strfreev (opts);
+ g_free (env);
}
void