]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
JIT: updated cache_size usage, remove unused cache_alloc / cache_free
authorFrode Solheim <frode@fs-uae.net>
Fri, 18 Sep 2015 22:00:06 +0000 (00:00 +0200)
committerFrode Solheim <frode@fs-uae.net>
Fri, 18 Sep 2015 22:00:06 +0000 (00:00 +0200)
include/memory.h
jit/compemu_support.cpp
od-win32/mman.cpp

index 713f668015066eeac665f0e1b1b991e1f71cc3aa..95a177c6859f1ee975d7938a7d10d43cc1364099 100644 (file)
@@ -14,9 +14,6 @@ extern void a1000_reset (void);
 
 #ifdef JIT
 extern int special_mem;
-
-extern uae_u8 *cache_alloc (int);
-extern void cache_free (uae_u8*);
 #endif
 
 #define S_READ 1
index 9102ca81981fe17d7b678f9e92d741ee931ae224..597476db59b5da390cf8161fe669775acf86ebf6 100644 (file)
@@ -121,8 +121,6 @@ extern bool canbang;
 
 #include "compemu_prefs.cpp"
 
-#define cache_size currprefs.cachesize
-
 #define uint32 uae_u32
 #define uint8 uae_u8
 
@@ -249,12 +247,8 @@ static bool                follow_const_jumps      = true;         // Flag: translation through constant j
 const bool             follow_const_jumps      = false;
 #endif
 
-#ifdef UAE
-/* ... */
-#else
-const uae_u32  MIN_CACHE_SIZE          = 1024;         // Minimal translation cache size (1 MB)
-static uae_u32 cache_size                      = 0;            // Size of total cache allocated for compiled blocks
-#endif
+const uae_u32 MIN_CACHE_SIZE = 1024; // Minimal translation cache size (1 MB)
+static uae_u32 cache_size = 0; // Size of total cache allocated for compiled blocks
 static uae_u32         current_cache_size      = 0;            // Cache grows upwards: how much has been consumed already
 static bool            lazy_flush              = true; // Flag: lazy translation cache invalidation
 #ifdef UAE
@@ -3440,6 +3434,9 @@ void alloc_cache(void)
                compiled_code = 0;
        }
 
+#ifdef UAE
+       cache_size = currprefs.cachesize;
+#endif
        if (cache_size == 0)
                return;
 
index ca5dfe85d3380e17f17b0d6c2a0443e0064c3d0b..c841f45698886f1863374497e97342a824c87476 100644 (file)
@@ -49,22 +49,6 @@ static void virtualfreewithlock (LPVOID addr, SIZE_T size, DWORD freetype)
        VirtualFree(addr, size, freetype);
 }
 
-#ifdef JIT
-#ifdef _WIN32
-
-void cache_free (uae_u8 *cache)
-{
-       virtualfreewithlock (cache, 0, MEM_RELEASE);
-}
-
-uae_u8 *cache_alloc (int size)
-{
-       return virtualallocwithlock (NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
-}
-
-#endif /*_WIN32 */
-#endif /* JIT */
-
 static uae_u32 lowmem (void)
 {
        uae_u32 change = 0;