diff options
Diffstat (limited to 'src/learning_gem5/part2')
-rw-r--r-- | src/learning_gem5/part2/simple_cache.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/learning_gem5/part2/simple_cache.cc b/src/learning_gem5/part2/simple_cache.cc index 4db2cfa52..1ddb5155e 100644 --- a/src/learning_gem5/part2/simple_cache.cc +++ b/src/learning_gem5/part2/simple_cache.cc @@ -390,7 +390,9 @@ SimpleCache::insert(PacketPtr pkt) // Write back the data. // Create a new request-packet pair - RequestPtr req = new Request(block->first, blockSize, 0, 0); + RequestPtr req = std::make_shared<Request>( + block->first, blockSize, 0, 0); + PacketPtr new_pkt = new Packet(req, MemCmd::WritebackDirty, blockSize); new_pkt->dataDynamic(block->second); // This will be deleted later |