Commit 07de6b80f86ec5f942f907fd5542fffa72ca02a5

Authored by KMG
1 parent d23b6d53
Exists in master and in 1 other branch v2

Make sure tests always grab aligned buffers (use valloc instead of malloc).

Test/reed_sol_test_01.c
... ... @@ -59,7 +59,7 @@ POSSIBILITY OF SUCH DAMAGE.
59 59  
60 60 #define BUFSIZE 4096
61 61  
62   -#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
  62 +#define talloc(type, num) (type *) valloc(sizeof(type)*(num))
63 63  
64 64 usage(char *s)
65 65 {
... ...
Test/reed_sol_test_02.c
... ... @@ -57,7 +57,7 @@ POSSIBILITY OF SUCH DAMAGE.
57 57 #include "jerasure.h"
58 58 #include "reed_sol.h"
59 59  
60   -#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
  60 +#define talloc(type, num) (type *) valloc(sizeof(type)*(num))
61 61  
62 62 void
63 63 timer_start (double *t)
... ...
Test/test_all_gfs.sh
... ... @@ -15,7 +15,7 @@ while read method; do
15 15 done
16 16  
17 17 # Test all w=16
18   -${GF_METHODS} | grep -v 'TABLE' | awk -F: '{ if ($1 == "w=16") print $2; }' |
  18 +${GF_METHODS} | awk -F: '{ if ($1 == "w=16") print $2; }' |
19 19 while read method; do
20 20 echo "Testing ${k} ${m} 16 ${method}"
21 21 ./reed_sol_test_01 ${k} ${m} 16 ${method}
... ...