summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorTim Rogers <[email protected]>2012-07-19 08:19:21 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:47:33 -0700
commitb939dbd8142d3ef8c5e598dbfcd004f02089329f (patch)
tree4f9cdd91c201bbae2d92569db809a9b5f5707e47 /src/gpgpu-sim
parent8d59181b80697dfc717abcd55da9c899e4cf0d07 (diff)
Fixing an error reported by valgrind.
Is really harmless since you can call delete on primatives allocated with new[] without consequence (all delete [] does is ensure that the destructors will be called) Still, it is always good practice to de-allocate anything allocated with new[] with delete[] - just in case the type allocated changes and the person that changes it forgets to update the de-allocation. Really, this little array should be on the stack... [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13414]
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/shader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index 558335e..d246393 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -990,7 +990,7 @@ struct shader_core_config : public core_config
assert(ntok == 1);
toks = strtok(NULL,",");
}
- delete tokd;
+ delete[] tokd;
if (n_thread_per_shader > MAX_THREAD_PER_SM) {
printf("GPGPU-Sim uArch: Error ** increase MAX_THREAD_PER_SM in abstract_hardware_model.h from %u to %u\n",