mem-garnet: Remove delete of param pointers of GarnetNetwork
All over gem5 the params pointers are not deleted within the classes that they were created for. Although this is a potential memory leak as of now, it is probably safer to follow general convention so that it can be fixed at once in the future. Change-Id: I74b662a8e635cdfb4dc1eae732dd114659fab2e9 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24246 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
d8e7d6bcb9
commit
e23ce9bc73
@@ -33,7 +33,6 @@
|
||||
#include <cassert>
|
||||
|
||||
#include "base/cast.hh"
|
||||
#include "base/stl_helpers.hh"
|
||||
#include "mem/ruby/common/NetDest.hh"
|
||||
#include "mem/ruby/network/MessageBuffer.hh"
|
||||
#include "mem/ruby/network/garnet2.0/CommonTypes.hh"
|
||||
@@ -45,7 +44,6 @@
|
||||
#include "mem/ruby/system/RubySystem.hh"
|
||||
|
||||
using namespace std;
|
||||
using m5::stl_helpers::deletePointers;
|
||||
|
||||
/*
|
||||
* GarnetNetwork sets up the routers and links and collects stats.
|
||||
@@ -140,14 +138,6 @@ GarnetNetwork::init()
|
||||
}
|
||||
}
|
||||
|
||||
GarnetNetwork::~GarnetNetwork()
|
||||
{
|
||||
deletePointers(m_routers);
|
||||
deletePointers(m_nis);
|
||||
deletePointers(m_networklinks);
|
||||
deletePointers(m_creditlinks);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function creates a link from the Network Interface (NI)
|
||||
* into the Network.
|
||||
|
||||
@@ -51,8 +51,8 @@ class GarnetNetwork : public Network
|
||||
public:
|
||||
typedef GarnetNetworkParams Params;
|
||||
GarnetNetwork(const Params *p);
|
||||
~GarnetNetwork() = default;
|
||||
|
||||
~GarnetNetwork();
|
||||
void init();
|
||||
|
||||
// Configuration (set externally)
|
||||
|
||||
Reference in New Issue
Block a user