Date: Fri, 5 Oct 2007 11:58:01 GMT From: Fredrik Lindberg <fli@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 127224 for review Message-ID: <200710051158.l95Bw1Ar093114@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127224 Change 127224 by fli@fli_genesis on 2007/10/05 11:57:44 - Add a periodic timer that calls obj_clean(). - Add a call to obj_destroy() on exit to free memory. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/mdnsd.c#8 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/mdnsd.c#8 (text+ko) ==== @@ -153,6 +153,17 @@ } /* + * Periodic object garabge collector, runs every 60 seconds + */ +static int +evh_objclean(const struct event_tmr *ev __unused, const ev_arg arg __unused) +{ + + obj_clean(); + return (0); +} + +/* * Link state change. * This routine is called 3 seconds after the real link state change * occured, this is to catch and ignore sporadic link changes. @@ -957,6 +968,7 @@ freeifaddrs(ifap); tmr_start(&glob, 1000, evh_cacheclean, &glob, 0); + tmr_start(&glob, 60000, evh_objclean, NULL, 0); uid = getuid(); euid = geteuid(); @@ -1001,6 +1013,7 @@ wq_destroy(glob.g_wq); event_destroy(glob.g_evl); mdns_bufpool_destroy(glob.g_bp); + obj_destroy(); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710051158.l95Bw1Ar093114>
