From 3b5d71306139499cb76069da04e6252b43799697 Mon Sep 17 00:00:00 2001 From: Akilan Date: Thu, 28 Aug 2025 11:18:56 +0100 Subject: [PATCH] test whole program --- benchmarks/benchmarks/XSbench/Main.c | 8 ++++---- benchmarks/benchmarks/XSbench/XSbench_header.h | 5 +++++ benchmarks/benchmarks/XSbench/malloc.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) 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