* Marco Elver
*/
+#include "mem/mem_checker_monitor.hh"
+
#include <memory>
#include "base/output.hh"
#include "base/trace.hh"
#include "debug/MemCheckerMonitor.hh"
-#include "mem/mem_checker_monitor.hh"
-
-using namespace std;
MemCheckerMonitor::MemCheckerMonitor(Params* params)
: MemObject(params),
// write. For reads, we have no data yet, so it doesn't make sense to
// allocate.
pkt_data.reset(new uint8_t[size]);
- memcpy(pkt_data.get(), pkt->getConstPtr<uint8_t*>(), size);
+ pkt->writeData(pkt_data.get());
}
// If a cache miss is served by a cache, a monitor near the memory
// a read. For writes, we have already given the MemChecker the data on
// the request, so it doesn't make sense to allocate on write.
pkt_data.reset(new uint8_t[size]);
- memcpy(pkt_data.get(), pkt->getConstPtr<uint8_t*>(), size);
+ pkt->writeData(pkt_data.get());
}
if (is_read || is_write) {