Explorar o código

port r11470 from 1.1: pin memory for matrix_as_vector

Samuel Thibault %!s(int64=11) %!d(string=hai) anos
pai
achega
8b83bc72aa
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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 end;
 
-	matrix = malloc(nx*sizeof(matrix[0]));
+	starpu_malloc((void **) &matrix, nx*sizeof(matrix[0]));
 	maxloops = LOOPS;
 #ifdef STARPU_HAVE_VALGRIND_H
 	if (RUNNING_ON_VALGRIND)
@@ -156,7 +156,7 @@ int check_size(int nx, struct starpu_codelet *vector_codelet, struct starpu_code
 		ret = EXIT_FAILURE;
 	}
 end:
-	free(matrix);
+	starpu_free(matrix);
 	return ret;
 }