--- hatari/src/uae-cpu/memory.c 2019/04/01 07:13:48 1.1.1.10 +++ hatari/src/uae-cpu/memory.c 2019/04/09 08:47:25 1.1.1.13 @@ -10,7 +10,7 @@ * This file is distributed under the GNU Public License, version 2 or at * your option any later version. Read the file gpl.txt for details. */ -const char Memory_rcsid[] = "Hatari $Id: memory.c,v 1.1.1.10 2019/04/01 07:13:48 root Exp $"; +const char Memory_fileid[] = "Hatari memory.c : " __DATE__ " " __TIME__; #include "config.h" #include "sysdeps.h" @@ -85,6 +85,7 @@ __inline__ void byteput (uaecptr addr, u /* Some prototypes: */ +extern void SDL_Quit(void); static int STmem_check (uaecptr addr, uae_u32 size) REGPARAM; static uae_u8 *STmem_xlate (uaecptr addr) REGPARAM; @@ -681,6 +682,7 @@ void memory_init(uae_u32 nNewSTMemSize, ROMmemory = malloc(2*1024*1024); if (!ROMmemory) { fprintf(stderr, "Out of memory (ROM/IO mem)!\n"); + SDL_Quit(); exit(1); } IdeMemory = ROMmemory + 0x100000; @@ -696,6 +698,7 @@ void memory_init(uae_u32 nNewSTMemSize, } if (!STmemory) { write_log ("virtual memory exhausted (STmemory)!\n"); + SDL_Quit(); exit(1); }