diff options
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r-- | src/mem/ruby/system/DMASequencer.cc | 8 | ||||
-rw-r--r-- | src/mem/ruby/system/DMASequencer.hh | 1 | ||||
-rw-r--r-- | src/mem/ruby/system/Sequencer.cc | 11 |
3 files changed, 13 insertions, 7 deletions
diff --git a/src/mem/ruby/system/DMASequencer.cc b/src/mem/ruby/system/DMASequencer.cc index 9b0157b45..2a458a408 100644 --- a/src/mem/ruby/system/DMASequencer.cc +++ b/src/mem/ruby/system/DMASequencer.cc @@ -26,6 +26,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <memory> + #include "debug/RubyDma.hh" #include "debug/RubyStats.hh" #include "mem/protocol/SequencerMsg.hh" @@ -69,7 +71,8 @@ DMASequencer::makeRequest(PacketPtr pkt) active_request.bytes_issued = 0; active_request.pkt = pkt; - SequencerMsg *msg = new SequencerMsg(clockEdge()); + std::shared_ptr<SequencerMsg> msg = + std::make_shared<SequencerMsg>(clockEdge()); msg->getPhysicalAddress() = Address(paddr); msg->getLineAddress() = line_address(msg->getPhysicalAddress()); msg->getType() = write ? SequencerRequestType_ST : SequencerRequestType_LD; @@ -107,7 +110,8 @@ DMASequencer::issueNext() return; } - SequencerMsg *msg = new SequencerMsg(clockEdge()); + std::shared_ptr<SequencerMsg> msg = + std::make_shared<SequencerMsg>(clockEdge()); msg->getPhysicalAddress() = Address(active_request.start_paddr + active_request.bytes_completed); diff --git a/src/mem/ruby/system/DMASequencer.hh b/src/mem/ruby/system/DMASequencer.hh index b3ba0be8c..13d79182d 100644 --- a/src/mem/ruby/system/DMASequencer.hh +++ b/src/mem/ruby/system/DMASequencer.hh @@ -30,6 +30,7 @@ #define __MEM_RUBY_SYSTEM_DMASEQUENCER_HH__ #include <ostream> +#include <memory> #include "mem/protocol/DMASequencerRequestType.hh" #include "mem/ruby/common/DataBlock.hh" diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index dcdaf6a6f..bd82d9468 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -679,11 +679,12 @@ Sequencer::issueRequest(PacketPtr pkt, RubyRequestType secondary_type) pc = pkt->req->getPC(); } - RubyRequest *msg = new RubyRequest(clockEdge(), pkt->getAddr(), - pkt->getPtr<uint8_t>(true), - pkt->getSize(), pc, secondary_type, - RubyAccessMode_Supervisor, pkt, - PrefetchBit_No, proc_id); + std::shared_ptr<RubyRequest> msg = + std::make_shared<RubyRequest>(clockEdge(), pkt->getAddr(), + pkt->getPtr<uint8_t>(true), + pkt->getSize(), pc, secondary_type, + RubyAccessMode_Supervisor, pkt, + PrefetchBit_No, proc_id); DPRINTFR(ProtocolTrace, "%15s %3s %10s%20s %6s>%-6s %s %s\n", curTick(), m_version, "Seq", "Begin", "", "", |