-/*
- * sgen-alloc.c: Object allocation routines + managed allocators
+/**
+ * \file
+ * Object allocation routines + managed allocators
*
* Author:
* Paolo Molaro (lupus@ximian.com)
* tlab_real_end points to the end of the TLAB.
*/
-#ifdef HAVE_KW_THREAD
-#define TLAB_START (sgen_thread_info->tlab_start)
-#define TLAB_NEXT (sgen_thread_info->tlab_next)
-#define TLAB_TEMP_END (sgen_thread_info->tlab_temp_end)
-#define TLAB_REAL_END (sgen_thread_info->tlab_real_end)
-#else
#define TLAB_START (__thread_info__->tlab_start)
#define TLAB_NEXT (__thread_info__->tlab_next)
#define TLAB_TEMP_END (__thread_info__->tlab_temp_end)
#define TLAB_REAL_END (__thread_info__->tlab_real_end)
-#endif
static GCObject*
alloc_degraded (GCVTable vtable, size_t size, gboolean for_mature)
int current_alloc = InterlockedIncrement (&alloc_count);
if (verify_before_allocs) {
- if ((current_alloc % verify_before_allocs) == 0)
+ if ((current_alloc % verify_before_allocs) == 0) {
+ LOCK_GC;
sgen_check_whole_heap_stw ();
+ UNLOCK_GC;
+ }
}
if (collect_before_allocs) {
if (((current_alloc % collect_before_allocs) == 0) && nursery_section) {