Exemplo n.º 1
0
void drc_exit(drc_core *drc)
{
	int i;

	/* free the cache */
	if (drc->cache_base)
		osd_free_executable(drc->cache_base);

	/* free all the l2 tables allocated */
	for (i = 0; i < (1 << drc->l1bits); i++)
		if (drc->lookup_l1[i] != drc->lookup_l2_recompile)
			free(drc->lookup_l1[i]);

	/* free the l1 table */
	if (drc->lookup_l1)
		free(drc->lookup_l1);

	/* free the default l2 table */
	if (drc->lookup_l2_recompile)
		free(drc->lookup_l2_recompile);

	/* free the lists */
	if (drc->sequence_list)
		free(drc->sequence_list);
	if (drc->tentative_list)
		free(drc->tentative_list);

	/* and the drc itself */
	free(drc);
}
Exemplo n.º 2
0
drc_cache::~drc_cache()
{
	// release the memory
	osd_free_executable(m_near, m_size);
}
Exemplo n.º 3
0
void drccache_free(drccache *cache)
{
	/* release the memory; this includes the cache object itself */
	osd_free_executable(cache->near, cache->size);
}