diff options
author | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-12 13:43:12 -0400 |
---|---|---|
committer | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-12 13:43:12 -0400 |
commit | dd18ffe51d7dbef59804e7af3384fe0cc28447a5 (patch) | |
tree | cbfb4152d48b5c6fa05b922175f4856ac1c8bac2 /src/cpu/memtest | |
parent | ba4c224c390916fb489aa7179655c71d7fca1e13 (diff) | |
download | gem5-dd18ffe51d7dbef59804e7af3384fe0cc28447a5.tar.xz |
Fix a memory leak in the memtester
--HG--
extra : convert_revision : 93062b0f1a3ba7a5210e2f27099f20ae8f66522b
Diffstat (limited to 'src/cpu/memtest')
-rw-r--r-- | src/cpu/memtest/memtest.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cpu/memtest/memtest.cc b/src/cpu/memtest/memtest.cc index f42f0f8e2..c44f28f9b 100644 --- a/src/cpu/memtest/memtest.cc +++ b/src/cpu/memtest/memtest.cc @@ -360,7 +360,11 @@ MemTest::tick() //For now we only allow one outstanding request per addreess per tester //This means we assume CPU does write forwarding to reads that alias something //in the cpu store buffer. - if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) return; + if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) { + delete result; + delete req; + return; + } else outstandingAddrs.insert(paddr); // ***** NOTE FOR RON: I'm not sure how to access checkMem. - Kevin @@ -395,7 +399,12 @@ MemTest::tick() //For now we only allow one outstanding request per addreess per tester //This means we assume CPU does write forwarding to reads that alias something //in the cpu store buffer. - if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) return; + if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) { + delete result; + delete req; + return; + } + else outstandingAddrs.insert(paddr); /* |