diff --git a/src/SocExplorerEngine/memtester/memtester.cpp b/src/SocExplorerEngine/memtester/memtester.cpp --- a/src/SocExplorerEngine/memtester/memtester.cpp +++ b/src/SocExplorerEngine/memtester/memtester.cpp @@ -57,19 +57,29 @@ unsigned int MemTester::measureMemSize(s testAddress = (unsigned int)(address+(1<Write(&curVal,1,testAddress); - plugin->Read(&curVal,1,testAddress); - if((unsigned int)curVal!=(unsigned int)(1<Read(&curVal,1,address); - if((curVal==(unsigned int)(1<Read(&curVal,1,address+currentAddress); + if(curVal!=currentAddress) + return false; + currentAddress = currentAddress <<1; + } + return true; } diff --git a/src/SocExplorerEngine/memtester/memtester.h b/src/SocExplorerEngine/memtester/memtester.h --- a/src/SocExplorerEngine/memtester/memtester.h +++ b/src/SocExplorerEngine/memtester/memtester.h @@ -14,6 +14,8 @@ public: static unsigned int measureMemSize(const QString& plugin, unsigned int address,unsigned int maxSize=0xFFFFFFFF); public slots: +private: + static bool m_check_space(socexplorerplugin* plugin,unsigned int address, unsigned int pow); }; #endif // MEMTESTER_H