mirror of
https://github.com/holub/mame
synced 2025-06-29 23:48:56 +03:00
(From Oliver Stoneberg)
This fixes the winwork.c and poly(new).c meory leaks in the viper.c driver. I didn't look at the x86drc.c, because Aaron said it will be changed soon and there is no need to investigate those leaks at all. As I wanted to update my own personal TODO about that fix I recognised it only happens in viper.c as well, so I took a stab at it. It was just anothe rmissing cleanup function and I also cleaned up the *_exit() potions/usage of the cores supporting DRC a bit.
This commit is contained in:
parent
fa3061392e
commit
24bea94d01
@ -482,6 +482,7 @@ static void mips3drc_exit(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
drc_exit(mips3.drc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -268,6 +268,7 @@ static void mips3drc_init(void)
|
|||||||
|
|
||||||
static void mips3drc_exit(void)
|
static void mips3drc_exit(void)
|
||||||
{
|
{
|
||||||
|
drc_exit(mips3.drc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,9 +252,8 @@ static void mips3_exit(void)
|
|||||||
x86log_free_context(mips3.log);
|
x86log_free_context(mips3.log);
|
||||||
|
|
||||||
/* clean up the DRC */
|
/* clean up the DRC */
|
||||||
mips3drc_exit();
|
|
||||||
drcfe_exit(mips3.drcfe);
|
drcfe_exit(mips3.drcfe);
|
||||||
drc_exit(mips3.drc);
|
mips3drc_exit();
|
||||||
|
|
||||||
/* free the cache */
|
/* free the cache */
|
||||||
osd_free_executable(mips3.core, CACHE_SIZE + sizeof(*mips3.core));
|
osd_free_executable(mips3.core, CACHE_SIZE + sizeof(*mips3.core));
|
||||||
|
@ -110,6 +110,11 @@ static void ppcdrc_reset(drc_core *drc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ppcdrc_exit(void)
|
||||||
|
{
|
||||||
|
drc_exit(ppc.drc);
|
||||||
|
}
|
||||||
|
|
||||||
static UINT32 *ppcdrc_getopptr(UINT32 address)
|
static UINT32 *ppcdrc_getopptr(UINT32 address)
|
||||||
{
|
{
|
||||||
UINT32 *result;
|
UINT32 *result;
|
||||||
|
@ -1101,7 +1101,7 @@ static void ppcdrc403_exit(void)
|
|||||||
#if LOG_CODE
|
#if LOG_CODE
|
||||||
//if (symfile) fclose(symfile);
|
//if (symfile) fclose(symfile);
|
||||||
#endif
|
#endif
|
||||||
drc_exit(ppc.drc);
|
ppcdrc_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ppcdrc403_reset(void)
|
static void ppcdrc403_reset(void)
|
||||||
@ -1343,7 +1343,7 @@ static void ppcdrc603_exit(void)
|
|||||||
#if LOG_CODE
|
#if LOG_CODE
|
||||||
//if (symfile) fclose(symfile);
|
//if (symfile) fclose(symfile);
|
||||||
#endif
|
#endif
|
||||||
drc_exit(ppc.drc);
|
ppcdrc_exit();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1534,7 +1534,7 @@ static void ppcdrc602_exit(void)
|
|||||||
#if LOG_CODE
|
#if LOG_CODE
|
||||||
//if (symfile) fclose(symfile);
|
//if (symfile) fclose(symfile);
|
||||||
#endif
|
#endif
|
||||||
drc_exit(ppc.drc);
|
ppcdrc_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ppcdrc602_reset(void)
|
static void ppcdrc602_reset(void)
|
||||||
@ -1718,7 +1718,7 @@ static void mpc8240drc_init(int index, int clock, const void *_config, int (*irq
|
|||||||
|
|
||||||
static void mpc8240drc_exit(void)
|
static void mpc8240drc_exit(void)
|
||||||
{
|
{
|
||||||
|
ppcdrc_exit();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1865,7 +1865,7 @@ static void ppc601drc_exit(void)
|
|||||||
#if LOG_CODE
|
#if LOG_CODE
|
||||||
//if (symfile) fclose(symfile);
|
//if (symfile) fclose(symfile);
|
||||||
#endif
|
#endif
|
||||||
drc_exit(ppc.drc);
|
ppcdrc_exit();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1998,7 +1998,7 @@ static void ppc604drc_exit(void)
|
|||||||
#if LOG_CODE
|
#if LOG_CODE
|
||||||
//if (symfile) fclose(symfile);
|
//if (symfile) fclose(symfile);
|
||||||
#endif
|
#endif
|
||||||
drc_exit(ppc.drc);
|
ppcdrc_exit();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -39,9 +39,15 @@
|
|||||||
|
|
||||||
static UINT8 backup_ram[0x2000];
|
static UINT8 backup_ram[0x2000];
|
||||||
|
|
||||||
|
static void viper_exit(running_machine *machine)
|
||||||
|
{
|
||||||
|
voodoo_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
static VIDEO_START(viper)
|
static VIDEO_START(viper)
|
||||||
{
|
{
|
||||||
|
add_exit_callback(machine, viper_exit);
|
||||||
|
|
||||||
voodoo_start(0, 0, VOODOO_3, 16, 16, 16);
|
voodoo_start(0, 0, VOODOO_3, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user