(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:
Aaron Giles 2008-01-06 01:24:16 +00:00
parent fa3061392e
commit 24bea94d01
6 changed files with 20 additions and 8 deletions

View File

@ -482,6 +482,7 @@ static void mips3drc_exit(void)
}
}
#endif
drc_exit(mips3.drc);
}

View File

@ -268,6 +268,7 @@ static void mips3drc_init(void)
static void mips3drc_exit(void)
{
drc_exit(mips3.drc);
}

View File

@ -252,9 +252,8 @@ static void mips3_exit(void)
x86log_free_context(mips3.log);
/* clean up the DRC */
mips3drc_exit();
drcfe_exit(mips3.drcfe);
drc_exit(mips3.drc);
mips3drc_exit();
/* free the cache */
osd_free_executable(mips3.core, CACHE_SIZE + sizeof(*mips3.core));

View File

@ -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)
{
UINT32 *result;

View File

@ -1101,7 +1101,7 @@ static void ppcdrc403_exit(void)
#if LOG_CODE
//if (symfile) fclose(symfile);
#endif
drc_exit(ppc.drc);
ppcdrc_exit();
}
static void ppcdrc403_reset(void)
@ -1343,7 +1343,7 @@ static void ppcdrc603_exit(void)
#if LOG_CODE
//if (symfile) fclose(symfile);
#endif
drc_exit(ppc.drc);
ppcdrc_exit();
}
#endif
@ -1534,7 +1534,7 @@ static void ppcdrc602_exit(void)
#if LOG_CODE
//if (symfile) fclose(symfile);
#endif
drc_exit(ppc.drc);
ppcdrc_exit();
}
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)
{
ppcdrc_exit();
}
#endif
@ -1865,7 +1865,7 @@ static void ppc601drc_exit(void)
#if LOG_CODE
//if (symfile) fclose(symfile);
#endif
drc_exit(ppc.drc);
ppcdrc_exit();
}
#endif
@ -1998,7 +1998,7 @@ static void ppc604drc_exit(void)
#if LOG_CODE
//if (symfile) fclose(symfile);
#endif
drc_exit(ppc.drc);
ppcdrc_exit();
}
#endif

View File

@ -39,9 +39,15 @@
static UINT8 backup_ram[0x2000];
static void viper_exit(running_machine *machine)
{
voodoo_exit(0);
}
static VIDEO_START(viper)
{
add_exit_callback(machine, viper_exit);
voodoo_start(0, 0, VOODOO_3, 16, 16, 16);
}