From ad65112a38e19754a85bb3599f799ec729c4168c Mon Sep 17 00:00:00 2001 From: Godmar Back Date: Wed, 15 Jul 2020 23:30:08 -0400 Subject: [PATCH] fixed compiler warning, upped avg libc --- config.h | 4 +++- mdriver.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.h b/config.h index 4a25eba..25aec59 100644 --- a/config.h +++ b/config.h @@ -51,8 +51,10 @@ * This is a base line for a single-threaded implementation, without * locking overhead, when clock() is used to time it. * This is not meaningful for the multi-threaded implementation + * + * Updated Summer 2020 for new hardware */ -#define AVG_LIBC_THRUPUT 21.5E6 /* 21,500 Kops/sec */ +#define AVG_LIBC_THRUPUT 31701E3 /* 31,701 Kops/sec */ /* * This constant determines the contributions of space utilization diff --git a/mdriver.c b/mdriver.c index b55aa88..649ef64 100644 --- a/mdriver.c +++ b/mdriver.c @@ -643,7 +643,7 @@ static void clear_ranges(range_t **ranges) */ static trace_t *read_trace(char *tracedir, char *filename, int verbose) { - char msg[MAXLINE]; + char msg[MAXLINE + 100]; FILE *tracefile; trace_t *trace; char type[MAXLINE]; @@ -665,7 +665,7 @@ static trace_t *read_trace(char *tracedir, char *filename, int verbose) strcpy(path, tracedir); strcat(path, filename); if ((tracefile = fopen(path, "r")) == NULL) { - sprintf(msg, "Could not open %s in read_trace", path); + snprintf(msg, sizeof msg, "Could not open %s in read_trace", path); unix_error(msg); } int rc;