Browse Source

port r11470 from 1.1: pin memory for matrix_as_vector

Samuel Thibault 11 years ago
parent
commit
8b83bc72aa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/microbenchs/matrix_as_vector.c

+ 2 - 2
tests/microbenchs/matrix_as_vector.c

@@ -93,7 +93,7 @@ int check_size(int nx, struct starpu_codelet *vector_codelet, struct starpu_code
 	struct timeval start;
 	struct timeval start;
 	struct timeval end;
 	struct timeval end;
 
 
-	matrix = malloc(nx*sizeof(matrix[0]));
+	starpu_malloc((void **) &matrix, nx*sizeof(matrix[0]));
 	maxloops = LOOPS;
 	maxloops = LOOPS;
 #ifdef STARPU_HAVE_VALGRIND_H
 #ifdef STARPU_HAVE_VALGRIND_H
 	if (RUNNING_ON_VALGRIND)
 	if (RUNNING_ON_VALGRIND)
@@ -156,7 +156,7 @@ int check_size(int nx, struct starpu_codelet *vector_codelet, struct starpu_code
 		ret = EXIT_FAILURE;
 		ret = EXIT_FAILURE;
 	}
 	}
 end:
 end:
-	free(matrix);
+	starpu_free(matrix);
 	return ret;
 	return ret;
 }
 }