diff --git a/benchmarks/benchmarks/XSbench/Main.c b/benchmarks/benchmarks/XSbench/Main.c index 943f551..8499837 100644 --- a/benchmarks/benchmarks/XSbench/Main.c +++ b/benchmarks/benchmarks/XSbench/Main.c @@ -5,15 +5,15 @@ #endif -#include "malloc.h" +// #include "malloc.h" -#define malloc MALLOCCHERI -#define free FREECHERI +// #define malloc MALLOCCHERI +// #define free FREECHERI int main(int argc, char* argv[] ) { // Init alloc - INITREGULARALLOC(); + // INITREGULARALLOC(); // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== diff --git a/benchmarks/benchmarks/XSbench/XSbench_header.h b/benchmarks/benchmarks/XSbench/XSbench_header.h index a0229ed..b17ea0d 100644 --- a/benchmarks/benchmarks/XSbench/XSbench_header.h +++ b/benchmarks/benchmarks/XSbench/XSbench_header.h @@ -9,6 +9,8 @@ #include #include +#include "malloc.h" + #ifdef _MSC_VER #define strncasecmp _strnicmp #define strcasecmp _stricmp @@ -50,6 +52,9 @@ // Starting Seed #define STARTING_SEED 1070 +#define malloc MALLOCCHERI +#define free FREECHERI + // Structures typedef struct{ double energy; diff --git a/benchmarks/benchmarks/XSbench/malloc.h b/benchmarks/benchmarks/XSbench/malloc.h index 0891974..b898b8b 100644 --- a/benchmarks/benchmarks/XSbench/malloc.h +++ b/benchmarks/benchmarks/XSbench/malloc.h @@ -152,6 +152,7 @@ pagesizes(size_t ps[MAXPAGESIZES]) return (pscnt); } +__attribute__((constructor)) INITREGULARALLOC(void) { size_t sz; // Hard-coded for 1GB huge page