From 153b6253312fc8cbf7faa39ec01bf141e69ae849 Mon Sep 17 00:00:00 2001 From: Akilan Date: Thu, 28 Aug 2025 11:11:11 +0100 Subject: [PATCH] test whole program --- benchmarks/benchmarks/XSbench/malloc.h | 78 -------------------------- 1 file changed, 78 deletions(-) diff --git a/benchmarks/benchmarks/XSbench/malloc.h b/benchmarks/benchmarks/XSbench/malloc.h index 3a5ca81..0891974 100644 --- a/benchmarks/benchmarks/XSbench/malloc.h +++ b/benchmarks/benchmarks/XSbench/malloc.h @@ -51,84 +51,6 @@ #define MAXPAGESIZES 2 -//#define TIMING - -/* Debug printf */ -#define dprintf(...) fprintf(stdout, __VA_ARGS__) - -/* Wrapper to check for errors */ -#define CHECK_ERROR(a) \ - if (a) \ - { \ - perror("Error at line\n\t" #a "\nSystem Msg"); \ - assert ((a) == 0); \ - } - -static inline void *MALLOC(size_t size) -{ - void * temp = malloc(size); - assert(temp); - return temp; -} - -static inline void *CALLOC(size_t num, size_t size) -{ - void * temp = calloc(num, size); - assert(temp); - return temp; -} - -static inline void *REALLOC(void *ptr, size_t size) -{ - void * temp = realloc(ptr, size); - assert(temp); - return temp; -} - -static inline char *GETENV(char *envstr) -{ - char *env = getenv(envstr); - if (!env) return "0"; - else return env; -} - -#define GET_TIME(start, end, duration) \ - duration.tv_sec = (end.tv_sec - start.tv_sec); \ - if (end.tv_nsec >= start.tv_nsec) { \ - duration.tv_nsec = (end.tv_nsec - start.tv_nsec); \ - } \ - else { \ - duration.tv_nsec = (1000000000L - (start.tv_nsec - end.tv_nsec)); \ - duration.tv_sec--; \ - } \ - if (duration.tv_nsec >= 1000000000L) { \ - duration.tv_sec++; \ - duration.tv_nsec -= 1000000000L; \ - } - -static inline unsigned int time_diff ( - struct timeval *end, struct timeval *begin) -{ -#ifdef TIMING - uint64_t result; - - result = end->tv_sec - begin->tv_sec; - result *= 1000000; /* usec */ - result += end->tv_usec - begin->tv_usec; - - return result; -#else - return 0; -#endif -} - -static inline void get_time (struct timeval *t) -{ -#ifdef TIMING - gettimeofday (t, NULL); -#endif -} - // Expirement work #define FILENAME "/dev/contigmem"