File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 2929// cmd1> C:\dev\ppsspp\pspautotests\tests\audio\atrac>copy /Y ..\..\..\__testoutput.txt stream.expected
3030// Then run the test, see above.
3131
32- // TODO: Add an AT3 dumping facility (and/or replacement?). Although the old implementation could do it more easily...
33-
34-
3532struct AT3BitrateMeta {
3633 u16 sampleSize;
3734 u8 dataByte;
Original file line number Diff line number Diff line change @@ -120,10 +120,11 @@ void JitBlockCache::Shutdown() {
120120// This clears the JIT cache. It's called from JitCache.cpp when the JIT cache
121121// is full and when saving and loading states.
122122void JitBlockCache::Clear () {
123+ // Note: We intentionally clear the block_map_ first to avoid O(N^2) behavior in RemoveBlockMap
124+ block_map_.clear ();
123125 for (int i = 0 ; i < num_blocks_; i++) {
124126 DestroyBlock (i, DestroyType::CLEAR);
125127 }
126- block_map_.clear ();
127128 proxyBlockMap_.clear ();
128129 links_to_.clear ();
129130 num_blocks_ = 0 ;
@@ -238,6 +239,7 @@ void JitBlockCache::RemoveBlockMap(int block_num) {
238239 // TODO: This is O(n), so O(n^2) when called for every block.
239240 for (auto it = block_map_.begin (); it != block_map_.end (); ++it) {
240241 if (it->second == (u32 )block_num) {
242+ _dbg_assert_ (false );
241243 block_map_.erase (it);
242244 break ;
243245 }
You can’t perform that action at this time.
0 commit comments