summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-11-09 08:13:31 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:49:21 -0700
commitc6becca8e1c9c188b515d4c66df66114ef448361 (patch)
tree511157339310a7ccbd7ac7aa6082e095f234fa3e
parent7b6c2f6dad0bc4c892788e495c75f169c6917bd5 (diff)
Remove memory leak in cudaSetupArgument()
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14564]
-rw-r--r--CHANGES1
-rw-r--r--libcuda/cuda_runtime_api.cc5
2 files changed, 1 insertions, 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;
}