Explorar o código

src/drivers/cpu/driver_cpu.c: fix unit for limited memory size

Nathalie Furmento %!s(int64=12) %!d(string=hai) anos
pai
achega
0e7dedf3a9
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/drivers/cpu/driver_cpu.c

+ 2 - 2
src/drivers/cpu/driver_cpu.c

@@ -222,12 +222,12 @@ static size_t _starpu_cpu_get_global_mem_size(int devid, struct _starpu_machine_
 	if (limit == -1)
 		// No limit is defined, we return the global memory size
 		return global_mem;
-	else if (limit > global_mem)
+	else if (limit*1024*1024 > global_mem)
 		// The requested limit is higher than what is available, we return the global memory size
 		return global_mem;
 	else
 		// We limit the memory
-		return limit;
+		return limit*1024*1024;
 }
 
 int _starpu_cpu_driver_init(struct starpu_driver *d)