42,43c42,45
< Address pktLineAddr(pkt->getAddr());
< pktLineAddr.makeLineAddress();
---
> Addr wBase = pkt->getAddr();
> Addr wTail = wBase + pkt->getSize();
> Addr mBase = m_PhysicalAddress.getAddress();
> Addr mTail = mBase + m_Size;
45,48c47
< if (pktLineAddr == m_LineAddress) {
< uint8_t *pktData = pkt->getPtr<uint8_t>(true);
< unsigned int size_in_bytes = pkt->getSize();
< unsigned startByte = pkt->getAddr() - m_LineAddress.getAddress();
---
> uint8_t * pktData = pkt->getPtr<uint8_t>(true);
50,52c49,50
< for (unsigned i = 0; i < size_in_bytes; ++i) {
< data[i + startByte] = pktData[i];
< }
---
> Addr cBase = std::max(wBase, mBase);
> Addr cTail = std::min(wTail, mTail);
54c52,53
< return true;
---
> for (Addr i = cBase; i < cTail; ++i) {
> data[i - mBase] = pktData[i - wBase];
56c55,56
< return false;
---
>
> return cBase < cTail;