From: Toni Wilen Date: Sat, 16 Mar 2019 18:21:05 +0000 (+0200) Subject: Non-JIT memory allocation fix, cleanup. X-Git-Tag: 4200~20 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=714e2755ae756772cf60a0f0c8497a3c6aa68fa2;p=francis%2Fwinuae.git Non-JIT memory allocation fix, cleanup. --- diff --git a/memory.cpp b/memory.cpp index 5314a2bd..4edd41f8 100644 --- a/memory.cpp +++ b/memory.cpp @@ -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; diff --git a/newcpu.cpp b/newcpu.cpp index 8cfc5ba2..4e1fa914 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -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;