summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/stride.cc
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2011-08-19 15:08:05 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2011-08-19 15:08:05 -0500
commit6779bd3e5da2355242cd3ba4967cb164c2a0b837 (patch)
treedb07098bd8df412d48807f1583e115ed553f6a11 /src/mem/cache/prefetch/stride.cc
parentb3a058f22034a52414304116021bf2b2acfaa258 (diff)
downloadgem5-6779bd3e5da2355242cd3ba4967cb164c2a0b837.tar.xz
Prefetcher: Fix some memory leaks with the prefetcher.
Diffstat (limited to 'src/mem/cache/prefetch/stride.cc')
-rw-r--r--src/mem/cache/prefetch/stride.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mem/cache/prefetch/stride.cc b/src/mem/cache/prefetch/stride.cc
index f71fd977d..a5cc805ef 100644
--- a/src/mem/cache/prefetch/stride.cc
+++ b/src/mem/cache/prefetch/stride.cc
@@ -118,6 +118,9 @@ StridePrefetcher::calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
}
}
DPRINTF(HWPrefetch, " replacing PC %x\n", (*min_pos)->instAddr);
+
+ // free entry and delete it
+ delete *min_pos;
tab.erase(min_pos);
}