summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2021-03-07 19:14:19 -0500
committerJoshua Bakita <jbakita@cs.unc.edu>2021-03-07 19:25:21 -0500
commit899765845196007c695a2f858dbe3a41b8db4a2b (patch)
tree98754916059357c0829fd8acc73130565d866ace /SD-VBS/benchmarks/texture_synthesis/src
parentafcfb8ee7b005edeba8163f00ce5300cf77ede85 (diff)
SD-VBS: Fix memory leaks and tweak allocation bounds
- Fix leaks in localization, multi_ncut, svm, and texture_synthesis - Lower preallocation for sift and texture_synthesis to match memory profile with QCIF - Remove trailing whitespace in script_localization.c
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src')
-rw-r--r--SD-VBS/benchmarks/texture_synthesis/src/c/script_texture_synthesis.c4
-rw-r--r--SD-VBS/benchmarks/texture_synthesis/src/c/texture.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/c/script_texture_synthesis.c b/SD-VBS/benchmarks/texture_synthesis/src/c/script_texture_synthesis.c
index 2ebb423..a3042e5 100644
--- a/SD-VBS/benchmarks/texture_synthesis/src/c/script_texture_synthesis.c
+++ b/SD-VBS/benchmarks/texture_synthesis/src/c/script_texture_synthesis.c
@@ -5,7 +5,7 @@ Author: Sravanthi Kota Venkata
5#include "texture.h" 5#include "texture.h"
6#include <malloc.h> 6#include <malloc.h>
7#include "extra.h" 7#include "extra.h"
8#define TEXTURE_MEM 1<<28 8#define TEXTURE_MEM 1<<20
9int WIDTHin,HEIGHTin; 9int WIDTHin,HEIGHTin;
10F2D *target, *result; 10F2D *target, *result;
11int WIDTH,HEIGHT; 11int WIDTH,HEIGHT;
@@ -48,6 +48,8 @@ int main(int argc, char **argv)
48 fFreeHandle(target); 48 fFreeHandle(target);
49 fFreeHandle(result); 49 fFreeHandle(result);
50 free(atlas); 50 free(atlas);
51 free(xloopout - WIDTH/2);
52 free(yloopout - HEIGHT/2);
51 WRITE_TO_FILE 53 WRITE_TO_FILE
52 return 0; 54 return 0;
53} 55}
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/c/texture.c b/SD-VBS/benchmarks/texture_synthesis/src/c/texture.c
index fb0f1ae..b268df9 100644
--- a/SD-VBS/benchmarks/texture_synthesis/src/c/texture.c
+++ b/SD-VBS/benchmarks/texture_synthesis/src/c/texture.c
@@ -150,6 +150,8 @@ void create_texture(F2D *image, params *data)
150 arrayref(atlas,aa(j,i)+1) = besty; 150 arrayref(atlas,aa(j,i)+1) = besty;
151 } 151 }
152 } 152 }
153 free(candlistx);
154 free(candlisty);
153} 155}
154 156
155// Creates a list of valid candidates for given pixel using only L-shaped causal area 157// Creates a list of valid candidates for given pixel using only L-shaped causal area