c-programming

Simple C programs
git clone git://git.laack.co/c-programming.git
Log | Files | Refs

commit cb92648ce2739c78723de76de22059637cf52dc7
parent fe2f8eb01d69608e1d5123a00e541180505d19f3
Author: Andrew Laack <andrew@laack.co>
Date:   Sun, 18 Oct 2026 12:51:22 -0500

Free mem

Diffstat:
Mperf-aware-programming/haversine/Makefile | 2+-
Mperf-aware-programming/haversine/main.c | 2++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/perf-aware-programming/haversine/Makefile b/perf-aware-programming/haversine/Makefile @@ -1,6 +1,6 @@ gen: mkdir artifacts || true - python3 gen.py artifacts/out.json 100 + python3 gen.py artifacts/out.json 30000 clean: rm -rf out.json diff --git a/perf-aware-programming/haversine/main.c b/perf-aware-programming/haversine/main.c @@ -18,4 +18,6 @@ int main(int argc, char** argv) { struct Coordinates* current = &coords[i]; printf("x0: %.10f, x1: %.10f, y0: %.10f, y1: %.10f\n", current->x0, current->x1, current->y0, current->y1); } + + free(coords); }