2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

ns_os_*memstats() -> ns_main_setmemstats()

This commit is contained in:
Mark Andrews
2001-09-07 00:37:02 +00:00
parent f56cdc894f
commit fe6b7ccc8d
7 changed files with 35 additions and 73 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.c,v 1.48 2001/09/06 02:13:51 marka Exp $ */
/* $Id: os.c,v 1.49 2001/09/07 00:36:57 marka Exp $ */
#include <config.h>
#include <stdarg.h>
@@ -43,7 +43,6 @@
#include <named/os.h>
static char *pidfile = NULL;
static char *memstats = NULL;
/*
* If there's no <linux/capability.h>, we don't care about <sys/prctl.h>
@@ -516,32 +515,8 @@ ns_os_writepidfile(const char *filename) {
(void)fclose(lockfile);
}
static inline void
cleanup_memstats(void) {
if (memstats != NULL)
free(memstats);
memstats = NULL;
}
void
ns_os_setmemstats(const char *filename) {
cleanup_memstats();
if (filename == NULL)
return;
memstats = malloc(strlen(filename) + 1);
if (memstats)
strcpy(memstats, filename);
}
const char *
ns_os_getmemstats(void) {
return (memstats);
}
void
ns_os_shutdown(void) {
closelog();
cleanup_pidfile();
cleanup_memstats();
}