Backed out changeset 94a7bb476fca: caused memory leak.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -103,6 +103,7 @@ void
|
||||
O3ThreadContext<Impl>::delVirtPort(VirtualPort *vp)
|
||||
{
|
||||
if (vp != thread->getVirtPort()) {
|
||||
vp->removeConn();
|
||||
delete vp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -747,6 +747,7 @@ template <class Impl>
|
||||
void
|
||||
OzoneCPU<Impl>::OzoneTC::delVirtPort(VirtualPort *vp)
|
||||
{
|
||||
vp->removeConn();
|
||||
delete vp;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -302,6 +302,7 @@ void
|
||||
SimpleThread::delVirtPort(VirtualPort *vp)
|
||||
{
|
||||
if (vp != virtPort) {
|
||||
vp->removeConn();
|
||||
delete vp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ ThreadState::connectPhysPort()
|
||||
// already existed. Fix this memory leak once the bus port IDs
|
||||
// for functional ports is resolved.
|
||||
if (physPort)
|
||||
physPort->disconnectFromPeer();
|
||||
physPort->removeConn();
|
||||
else
|
||||
physPort = new FunctionalPort(csprintf("%s-%d-funcport",
|
||||
baseCpu->name(), tid));
|
||||
@@ -140,7 +140,7 @@ ThreadState::connectVirtPort()
|
||||
// already existed. Fix this memory leak once the bus port IDs
|
||||
// for functional ports is resolved.
|
||||
if (virtPort)
|
||||
virtPort->disconnectFromPeer();
|
||||
virtPort->removeConn();
|
||||
else
|
||||
virtPort = new VirtualPort(csprintf("%s-%d-vport",
|
||||
baseCpu->name(), tid));
|
||||
|
||||
Reference in New Issue
Block a user