summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2008-06-28 13:19:38 -0400
committerSteve Reinhardt <stever@gmail.com>2008-06-28 13:19:38 -0400
commitcaaac16803db6eaf3ee20b5d062ec2211fe6584d (patch)
treed3664f74378429cc389c6e166aebaca7fbcd6963 /src/cpu/o3
parent6b45238316052f458ba9ebc9d24a91cfa9e41cf1 (diff)
downloadgem5-caaac16803db6eaf3ee20b5d062ec2211fe6584d.tar.xz
Backed out changeset 94a7bb476fca: caused memory leak.
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/fetch.hh4
-rw-r--r--src/cpu/o3/fetch_impl.hh2
-rw-r--r--src/cpu/o3/lsq.hh4
-rw-r--r--src/cpu/o3/lsq_impl.hh2
-rwxr-xr-xsrc/cpu/o3/thread_context_impl.hh1
5 files changed, 7 insertions, 6 deletions
diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh
index 3ada0328f..d954bd1e7 100644
--- a/src/cpu/o3/fetch.hh
+++ b/src/cpu/o3/fetch.hh
@@ -80,8 +80,8 @@ class DefaultFetch
public:
/** Default constructor. */
- IcachePort(DefaultFetch<Impl> *_fetch, O3CPU *_cpu)
- : Port(_fetch->name() + "-iport", _cpu), fetch(_fetch)
+ IcachePort(DefaultFetch<Impl> *_fetch)
+ : Port(_fetch->name() + "-iport"), fetch(_fetch)
{ }
bool snoopRangeSent;
diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh
index ecfbacd98..7d344fa33 100644
--- a/src/cpu/o3/fetch_impl.hh
+++ b/src/cpu/o3/fetch_impl.hh
@@ -167,7 +167,7 @@ DefaultFetch<Impl>::DefaultFetch(O3CPU *_cpu, Params *params)
instSize = sizeof(TheISA::MachInst);
// Name is finally available, so create the port.
- icachePort = new IcachePort(this, cpu);
+ icachePort = new IcachePort(this);
icachePort->snoopRangeSent = false;
diff --git a/src/cpu/o3/lsq.hh b/src/cpu/o3/lsq.hh
index 82d73c6ee..06de608e0 100644
--- a/src/cpu/o3/lsq.hh
+++ b/src/cpu/o3/lsq.hh
@@ -296,8 +296,8 @@ class LSQ {
public:
/** Default constructor. */
- DcachePort(LSQ *_lsq, O3CPU *_cpu)
- : Port(_lsq->name() + "-dport", _cpu), lsq(_lsq)
+ DcachePort(LSQ *_lsq)
+ : Port(_lsq->name() + "-dport"), lsq(_lsq)
{ }
bool snoopRangeSent;
diff --git a/src/cpu/o3/lsq_impl.hh b/src/cpu/o3/lsq_impl.hh
index 41ab66dd0..8ed6f7f54 100644
--- a/src/cpu/o3/lsq_impl.hh
+++ b/src/cpu/o3/lsq_impl.hh
@@ -112,7 +112,7 @@ LSQ<Impl>::DcachePort::recvRetry()
template <class Impl>
LSQ<Impl>::LSQ(O3CPU *cpu_ptr, IEW *iew_ptr, Params *params)
- : cpu(cpu_ptr), iewStage(iew_ptr), dcachePort(this, cpu_ptr),
+ : cpu(cpu_ptr), iewStage(iew_ptr), dcachePort(this),
LQEntries(params->LQEntries),
SQEntries(params->SQEntries),
numThreads(params->numberOfThreads),
diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh
index 514d3de64..865d58635 100755
--- a/src/cpu/o3/thread_context_impl.hh
+++ b/src/cpu/o3/thread_context_impl.hh
@@ -103,6 +103,7 @@ void
O3ThreadContext<Impl>::delVirtPort(VirtualPort *vp)
{
if (vp != thread->getVirtPort()) {
+ vp->removeConn();
delete vp;
}
}