]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Non-JIT memory allocation fix, cleanup.
authorToni Wilen <twilen@winuae.net>
Sat, 16 Mar 2019 18:21:05 +0000 (20:21 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 16 Mar 2019 18:21:05 +0000 (20:21 +0200)
memory.cpp
newcpu.cpp

index 5314a2bd2494781f0ef9577a9207bfeca3d5e28d..4edd41f8906c11e10e5559eda83a883000b28ac3 100644 (file)
@@ -1855,8 +1855,11 @@ static void set_direct_memory(addrbank *ab)
 bool mapped_malloc (addrbank *ab)
 {
        ab->startmask = ab->start;
+       ab->startaccessmask = ab->start & ab->mask;
        ab->baseaddr = xcalloc (uae_u8, ab->reserved_size + 4);
        ab->allocated_size =  ab->baseaddr != NULL ? ab->reserved_size : 0;
+       ab->baseaddr_direct_r = NULL;
+       ab->baseaddr_direct_w = NULL;
        ab->flags &= ~ABFLAG_MAPPED;
        set_direct_memory(ab);
        return ab->baseaddr != NULL;
index 8cfc5ba2f180f0c17dca6614634bfe7106ed875b..4e1fa9143985f25defe866ca3a3ebde35c086eb2 100644 (file)
@@ -7726,7 +7726,7 @@ static uaecptr disasm_mmu030(uaecptr pc, uae_u16 opcode, uae_u16 extra, struct i
                int rw = (extra >> 9) & 1;
                int fd = (extra >> 8) & 1;
                int unused = (extra & 0xff);
-               TCHAR *r = NULL;
+               const TCHAR *r = NULL;
 
                if (mmu_op30_invea(opcode))
                        break;