Compare commits

..

2 Commits

Author SHA1 Message Date
46fd8a30bc day 18: improve tree structure explanation 2022-01-14 11:49:23 +01:00
77ef1fa003 Makefile day 19: added memcheck targets 2022-01-14 11:48:47 +01:00
2 changed files with 19 additions and 10 deletions

View File

@@ -24,14 +24,15 @@
* *
* Example, [1,[4,2]] is represented as : * Example, [1,[4,2]] is represented as :
* *
* ------> SN root <-------------- Depth: 0 * +-------> SN root <---------------+ Depth: 0
* | / \ | * | / \ |
* LL| / \ | * |LL / \ |
* | / \ |LL * | / \ |LL
* --> 1 <--- SN node | Depth: 1 * +---> 1 <--+ SN node | Depth: 1
* | / \ | * | / \ |
* |LL / \ |
* | / \ | * | / \ |
* LL---> 4 <-------> 2 <-- Depth: 2 * +--> 4 <-------> 2 <---+ Depth: 2
* LL * LL
*/ */

View File

@@ -40,10 +40,18 @@ CFLAGS += -DDEBUG_POOL # memory pools management
TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n" TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n"
export PATH := .:$(PATH) export PATH := .:$(PATH)
.PHONY: clean all compile ex1 ex2 .PHONY: clean all compile memcheck memcheck1 memcheck2 ex1 ex2
all: ex1 ex2 all: ex1 ex2
memcheck: memcheck1 memcheck2
memcheck1:
@valgrind -q -s --track-origins=yes aoc-c -p 1 < $(INPUT)
memcheck2:
@valgrind -q -s --track-origins=yes aoc-c -p 2 < $(INPUT)
compile: aoc-c compile: aoc-c
ex1: aoc-c ex1: aoc-c