From c6becca8e1c9c188b515d4c66df66114ef448361 Mon Sep 17 00:00:00 2001 From: Wilson Fung Date: Fri, 9 Nov 2012 08:13:31 -0800 Subject: Remove memory leak in cudaSetupArgument() [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14564] --- CHANGES | 1 + libcuda/cuda_runtime_api.cc | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index d46de2b..23d2db2 100644 --- a/CHANGES +++ b/CHANGES @@ -66,6 +66,7 @@ Version 3.1.1+edits (development branch) versus 3.1.1 core and to allow a more flexible broadcast mechanism. - Fixed the timing model for LDU instruction, before it was not recognized as a memory instruction in the timing model. + - Removed memory leak in cudaSetupArgument(). Version 3.1.1 versus 3.1.0 - Add checks to top level makefile to ensure setup_environment is run and checks to diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 1f30311..45fe1f6 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -897,11 +897,6 @@ __host__ cudaError_t CUDARTAPI cudaSetupArgument(const void *arg, size_t size, s kernel_config &config = g_cuda_launch_stack.back(); config.set_arg(arg,size,offset); - struct gpgpu_ptx_sim_arg *param = (gpgpu_ptx_sim_arg*) calloc(1,sizeof(struct gpgpu_ptx_sim_arg)); - param->m_start = arg; - param->m_nbytes = size; - param->m_offset = offset; - return g_last_cudaError = cudaSuccess; } -- cgit v1.3