summaryrefslogtreecommitdiff
path: root/src/cpu/simple
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-12-02 06:07:43 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2014-12-02 06:07:43 -0500
commit41846cb61b0f511099eb9a203f11885de328ab45 (patch)
tree7563b309ba914ea57dd12e6cfba3ea33817ab1b1 /src/cpu/simple
parent5df96cb690168d750ab0fafffd11fb51624374d2 (diff)
downloadgem5-41846cb61b0f511099eb9a203f11885de328ab45.tar.xz
mem: Assume all dynamic packet data is array allocated
This patch simplifies how we deal with dynamically allocated data in the packet, always assuming that it is array allocated, and hence should be array deallocated (delete[] as opposed to delete). The only uses of dataDynamic was in the Ruby testers. The ARRAY_DATA flag in the packet is removed accordingly. No defragmentation of the flags is done at this point, leaving a gap in the bit masks. As the last part the patch, it renames dataDynamicArray to dataDynamic.
Diffstat (limited to 'src/cpu/simple')
-rw-r--r--src/cpu/simple/timing.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc
index 2d0ab330e..c2bcdee63 100644
--- a/src/cpu/simple/timing.cc
+++ b/src/cpu/simple/timing.cc
@@ -271,7 +271,7 @@ TimingSimpleCPU::sendData(RequestPtr req, uint8_t *data, uint64_t *res,
{
PacketPtr pkt;
buildPacket(pkt, req, read);
- pkt->dataDynamicArray<uint8_t>(data);
+ pkt->dataDynamic<uint8_t>(data);
if (req->getFlags().isSet(Request::NO_ACCESS)) {
assert(!dcache_pkt);
pkt->makeResponse();
@@ -379,7 +379,7 @@ TimingSimpleCPU::buildSplitPacket(PacketPtr &pkt1, PacketPtr &pkt2,
req->setPhys(req1->getPaddr(), req->getSize(), req1->getFlags(), dataMasterId());
PacketPtr pkt = new Packet(req, pkt1->cmd.responseCommand());
- pkt->dataDynamicArray<uint8_t>(data);
+ pkt->dataDynamic<uint8_t>(data);
pkt1->dataStatic<uint8_t>(data);
pkt2->dataStatic<uint8_t>(data + req1->getSize());