X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=libgc%2Falloc.c;h=9ec6992352ad893b381dff712b37791359a183e8;hb=34dd20ad452122ca04c00c54be2293737dba1315;hp=e8ab9ddfc5f9452a853f0bebe380585261ac2269;hpb=a8b22e0e864c03b8cfd2f2cb5a8075b6611c5553;p=mono.git diff --git a/libgc/alloc.c b/libgc/alloc.c index e8ab9ddfc5f..9ec6992352a 100644 --- a/libgc/alloc.c +++ b/libgc/alloc.c @@ -271,10 +271,6 @@ void GC_maybe_gc() static int n_partial_gcs = 0; if (GC_should_collect()) { - if (GC_notify_event) - GC_notify_event (GC_EVENT_START); - - if (!GC_incremental) { GC_gcollect_inner(); n_partial_gcs = 0; @@ -320,10 +316,6 @@ void GC_maybe_gc() GC_n_attempts++; } } - - - if (GC_notify_event) - GC_notify_event (GC_EVENT_END); } } @@ -340,6 +332,10 @@ GC_stop_func stop_func; CLOCK_TYPE start_time, current_time; # endif if (GC_dont_gc) return FALSE; + + if (GC_notify_event) + GC_notify_event (GC_EVENT_START); + if (GC_incremental && GC_collection_in_progress()) { # ifdef CONDPRINT if (GC_print_stats) { @@ -402,6 +398,9 @@ GC_stop_func stop_func; MS_TIME_DIFF(current_time,start_time)); } # endif + if (GC_notify_event) + GC_notify_event (GC_EVENT_END); + return(TRUE); }