/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/06 04:31:07	563
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/06 04:33:03	564
@@ -59,6 +59,7 @@
 #endif
 
         const uint MEM_1MB = 0x00100000;
+        const uint MEM_CHUNK_SIZE = 16; /* MEM_1MB * MB_SIZE = MB_SIZE in megabytes */
 
         const bool USE_OLD_SEARCH_RESULTS_COMPRATOR_CODE = false;
         const bool USE_NONRANGE_SEARCH_RESULT_READER = false;
@@ -1108,13 +1109,12 @@
                         SearchResultWriter writer = new SearchResultWriter((int)(count), SearchGuid);
                         int Last_Whole_Percent_Done = 0;
                         uint size = 0;
-                        const uint MB_SIZE = 16; /* MEM_1MB * MB_SIZE = MB_SIZE in megabytes */
                         switch (sdt)
                         {
-                            case SearchDataTypes._8bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
-                            case SearchDataTypes._16bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
-                            case SearchDataTypes._32bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
-                            case SearchDataTypes._64bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                            case SearchDataTypes._8bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                            case SearchDataTypes._16bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                            case SearchDataTypes._32bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                            case SearchDataTypes._64bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
                         }
                         //uint size = STEP_SIZE * 4096;
                         for (uint i = MemoryRangeStart; i < MemoryRangeSize; i += size)
@@ -1551,14 +1551,13 @@
                             provider.OpenProvider();
                             //int count = (int)((MemoryRangeSize - MemoryRangeStart) / STEP_SIZE);
                             //SearchResultWriter writer = new SearchResultWriter((int)(count), SearchGuid);                                
-                            uint size = 0;
-                            const uint MB_SIZE = 16; /* MEM_1MB * MB_SIZE = MB_SIZE in megabytes */
+                            uint size = 0;                           
                             switch (sdt)
                             {
-                                case SearchDataTypes._8bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
-                                case SearchDataTypes._16bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
-                                case SearchDataTypes._32bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
-                                case SearchDataTypes._64bits: size = STEP_SIZE * MEM_1MB * (MB_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                                case SearchDataTypes._8bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                                case SearchDataTypes._16bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                                case SearchDataTypes._32bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
+                                case SearchDataTypes._64bits: size = STEP_SIZE * MEM_1MB * (MEM_CHUNK_SIZE / BitTools.SizeOf<uint>(sdt)); break;
                             }
                             //size = STEP_SIZE * 4096;
                             for (uint i = MemoryRangeStart; i < MemoryRangeSize; i += size)

 

  ViewVC Help
Powered by ViewVC 1.1.22