Skip to content

Commit 4d3a1e8

Browse files
committed
Updated custom workload prints
1 parent c51542c commit 4d3a1e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test_mte_customWorkload_new.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
#define GRANULE_SZ 16
4141
#define MALLOC_HDR_SZ 64
42-
#define MALLOC_ARR_LEN 166000 // this has to be atleast the #rows in the workload file!
42+
#define MALLOC_ARR_LEN 175000 // this has to be atleast the #rows in the workload file!
4343

4444
/*
4545
* Insert a random logical tag into the given pointer.
@@ -82,9 +82,11 @@ int main(int argc, char const *argv[])
8282
// // open file:
8383
FILE *fp;
8484
fp = fopen("mysqld_v2_workload_20k_rwRe2New2_21175.txt", "r");
85+
// printf("1\n");
8586
// // read file: put malloc sizes & freed mallocs in malloc_sizes arr.
8687
if (fp)
8788
{
89+
// printf("2\n");
8890
char buf[256];
8991
while (true)
9092
{
@@ -195,7 +197,7 @@ int main(int argc, char const *argv[])
195197
// free: Just 0 all granules.
196198
int free_index = -1*malloc_sizes[i];
197199
if (i % 5000 == 7)
198-
printf("FREE-ing index %i at offset: %li (tag: %lu, sz: %i) \n !!!", free_index, malloc_orig_offsets[free_index], malloc_tags[free_index], malloc_sizes[free_index]);
200+
printf("FREE-ing i=%i index %i at offset: %li (tag: %lu, sz: %i) \n !!!", i, free_index, malloc_orig_offsets[free_index], malloc_tags[free_index], malloc_sizes[free_index]);
199201

200202
// tag mem with 0
201203
malloc_tags[free_index] = 0;

0 commit comments

Comments
 (0)