mem: Add const getters for write packet data
This patch takes a first step in tightening up how we use the data pointer in write packets. A const getter is added for the pointer itself (getConstPtr), and a number of member functions are also made const accordingly. In a range of places throughout the memory system the new member is used. The patch also removes the unused isReadWrite function.
This commit is contained in:
@@ -503,7 +503,7 @@ FetchUnit::processCacheCompletion(PacketPtr pkt)
|
||||
|
||||
// Copy Data to pendingFetch queue...
|
||||
(*pend_it)->block = new uint8_t[cacheBlkSize];
|
||||
memcpy((*pend_it)->block, cache_pkt->getPtr<uint8_t>(), cacheBlkSize);
|
||||
memcpy((*pend_it)->block, cache_pkt->getConstPtr<uint8_t>(), cacheBlkSize);
|
||||
(*pend_it)->valid = true;
|
||||
|
||||
cache_req->setMemAccPending(false);
|
||||
|
||||
Reference in New Issue
Block a user