From 0f3bdd67534efe0f5c059c070b051d84d1988eee Mon Sep 17 00:00:00 2001 From: Julian Weigt Date: Fri, 9 Jan 2026 18:11:29 +0000 Subject: Remove malloc also for maximal function computation. --- charf.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/charf.c b/charf.c index c849c55..085c6a4 100644 --- a/charf.c +++ b/charf.c @@ -67,16 +67,9 @@ VALUETYPE integratep(VALUETYPE* f, EXPTYPE p, int D){ void compute_maximalfunction(VALUETYPE* f, VALUETYPE* Mf, int D){ /*Sf[i][j] will be the integral of f on [min(i,j),max(i,j)]*/ - //VALUETYPE Sf[N][N]; + VALUETYPE Sf[N][N]; /*Af[i][j] will be the average of f on [min(i,j),max(i,j)]*/ - //VALUETYPE Af[N][N]; - /*Apparently may become too big for stack or something so have to use malloc instead.*/ - VALUETYPE* Sf[N]; - VALUETYPE* Af[N]; - for(int i=0; i