summaryrefslogtreecommitdiff
path: root/src/arch/alpha
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-06-12 18:58:29 -0400
committerKevin Lim <ktlim@umich.edu>2006-06-12 18:58:29 -0400
commit5639fb2c431fffa11392f34f90619fac806aa277 (patch)
tree4f5a827eb42bb2bb7199a0f8b90f6bf3862c3731 /src/arch/alpha
parentcaca57421b32410f6ff1356ae75684891337073f (diff)
downloadgem5-5639fb2c431fffa11392f34f90619fac806aa277.tar.xz
Fix memory leak.
src/arch/alpha/ev5.cc: Fix memory leak. The faults are refcounted, but that only works if you're actually assigning them to a RefCountingPtr. --HG-- extra : convert_revision : 9a57963eb5d5d86c16023bfedb0fb5ccdbe7efaa
Diffstat (limited to 'src/arch/alpha')
-rw-r--r--src/arch/alpha/ev5.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/arch/alpha/ev5.cc b/src/arch/alpha/ev5.cc
index c419762b7..247c5f56e 100644
--- a/src/arch/alpha/ev5.cc
+++ b/src/arch/alpha/ev5.cc
@@ -59,8 +59,12 @@ AlphaISA::initCPU(ThreadContext *tc, int cpuId)
tc->setIntReg(16, cpuId);
tc->setIntReg(0, cpuId);
- tc->setPC(tc->readMiscReg(IPR_PAL_BASE) + (new ResetFault)->vect());
+ AlphaFault *reset = new ResetFault;
+
+ tc->setPC(tc->readMiscReg(IPR_PAL_BASE) + reset->vect());
tc->setNextPC(tc->readPC() + sizeof(MachInst));
+
+ delete reset;
}
////////////////////////////////////////////////////////////////////////