1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 18:08:20 +00:00

Clear tmps memory region after autotune use

This commit is contained in:
Jens Steube 2021-07-19 11:59:53 +02:00
parent 0504498e86
commit 7d43b6e1eb

View File

@ -403,6 +403,10 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
CU_rc = run_cuda_kernel_memset (hashcat_ctx, device_param, device_param->cuda_d_result, 0, device_param->size_results);
if (CU_rc == -1) return -1;
CU_rc = run_cuda_kernel_memset (hashcat_ctx, device_param, device_param->cuda_d_tmps, 0, device_param->size_tmps);
if (CU_rc == -1) return -1;
}
if (device_param->is_hip == true)
@ -424,6 +428,10 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
HIP_rc = run_hip_kernel_memset (hashcat_ctx, device_param, device_param->hip_d_result, 0, device_param->size_results);
if (HIP_rc == -1) return -1;
HIP_rc = run_hip_kernel_memset (hashcat_ctx, device_param, device_param->hip_d_tmps, 0, device_param->size_tmps);
if (HIP_rc == -1) return -1;
}
if (device_param->is_opencl == true)
@ -445,6 +453,10 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
CL_rc = run_opencl_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_result, 0, device_param->size_results);
if (CL_rc == -1) return -1;
CL_rc = run_opencl_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_tmps, 0, device_param->size_tmps);
if (CL_rc == -1) return -1;
}
// reset timer