File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 12
12
13
13
steps :
14
14
- uses : actions/checkout@v3
15
+
16
+ - name : Install Valgrind
17
+ run : sudo apt-get install valgrind -y
18
+
15
19
- name : Make
16
- run : cc -v && make
20
+ run : gcc --version && make valgrind
Original file line number Diff line number Diff line change @@ -7,8 +7,9 @@ SRC= $(SRC_FOLDER)/$(SRC_MAIN)
7
7
8
8
BIN_FOLDER = ./build
9
9
BIN = $(BIN_FOLDER ) /hashtables.bin
10
+ DEBUG_BIN = $(BIN_FOLDER ) /hashtables-debug.bin
10
11
11
- .PHONY =default build run clean
12
+ .PHONY =default build run clean valgrind
12
13
13
14
default : clean run
14
15
@@ -21,3 +22,8 @@ run: build
21
22
22
23
clean :
23
24
rm -rf $(BIN_FOLDER )
25
+
26
+ valgrind :
27
+ mkdir -p $(BIN_FOLDER )
28
+ gcc $(SRC ) -Wall -pedantic -g -ggdb -O0 -std=c18 -o $(DEBUG_BIN )
29
+ valgrind $(DEBUG_BIN )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ unsigned long hash_str_djb2(char *raw_string)
22
22
}
23
23
24
24
return hash_value ;
25
- };
25
+ }
26
26
27
27
/**
28
28
* @brief Internal data structure, each bucket is a row in the hash table powering the HashStrSet.
You can’t perform that action at this time.
0 commit comments