any function in it be NULL; use NULL as the default vtable.
(GC_mono_debugger_add_all_threads): New public function.
- * pthread_support.c (GC_new_thread): Use calloc() instead of
- GC_INTERNAL_MALLOC() to allocate the `GC_thread' structure.
+ * pthread_support.c
(GC_delete_thread): Call `gc_thread_vtable->thread_exited()'.
(GC_thr_init): Call `gc_thread_vtable->thread_created()'.
- (GC_start_routine_head): Likewise; use calloc() instead of
- GC_INTERNAL_MALLOC() to allocate the `start_info'.
2006-04-05 Zoltan Varga <vargaz@gmail.com>
result = &first_thread;
first_thread_used = TRUE;
} else {
- result = calloc (1, sizeof (struct GC_Thread_Rep));
+ result = (struct GC_Thread_Rep *)
+ GC_INTERNAL_MALLOC(sizeof(struct GC_Thread_Rep), NORMAL);
}
if (result == 0) return(0);
result -> id = id;
if (gc_thread_vtable && gc_thread_vtable->thread_exited)
gc_thread_vtable->thread_exited (id, &p->stop_info.stack_ptr);
#endif
- free(p);
+ GC_INTERNAL_FREE(p);
}
/* If a thread has been joined, but we have not yet */
} else {
prev -> next = p -> next;
}
- free(p);
+ GC_INTERNAL_FREE(p);
}
/* Return a GC_thread corresponding to a given pthread_t. */
GC_destroy_thread_local(p);
}
# endif /* THREAD_LOCAL_ALLOC */
- if (p != &first_thread) free(p);
+ if (p != &first_thread) GC_INTERNAL_FREE(p);
}
}
GC_threads[hv] = me;
}
+ GC_INTERNAL_FREE(p);
}
#endif /* HANDLE_FORK */
/* responsibility. */
LOCK();
- si = calloc (1, sizeof (struct start_info));
+ si = (struct start_info *)GC_INTERNAL_MALLOC(sizeof(struct start_info),
+ NORMAL);
UNLOCK();
if (!parallel_initialized) GC_init_parallel();
if (0 == si) return(ENOMEM);
}
sem_destroy(&(si -> registered));
LOCK();
- free(si);
+ GC_INTERNAL_FREE(si);
UNLOCK();
return(result);