提交 8a8a608f 编写于 作者: B bellard

use memset() (Daniel Egger)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1091 c046a42c-6fe2-441c-8c8c-71466251a162
上级 d63d307f
...@@ -315,7 +315,6 @@ static void page_flush_tb(void) ...@@ -315,7 +315,6 @@ static void page_flush_tb(void)
/* XXX: tb_flush is currently not thread safe */ /* XXX: tb_flush is currently not thread safe */
void tb_flush(CPUState *env) void tb_flush(CPUState *env)
{ {
int i;
#if defined(DEBUG_FLUSH) #if defined(DEBUG_FLUSH)
printf("qemu: flush code_size=%d nb_tbs=%d avg_tb_size=%d\n", printf("qemu: flush code_size=%d nb_tbs=%d avg_tb_size=%d\n",
code_gen_ptr - code_gen_buffer, code_gen_ptr - code_gen_buffer,
...@@ -323,12 +322,10 @@ void tb_flush(CPUState *env) ...@@ -323,12 +322,10 @@ void tb_flush(CPUState *env)
nb_tbs > 0 ? (code_gen_ptr - code_gen_buffer) / nb_tbs : 0); nb_tbs > 0 ? (code_gen_ptr - code_gen_buffer) / nb_tbs : 0);
#endif #endif
nb_tbs = 0; nb_tbs = 0;
for(i = 0;i < CODE_GEN_HASH_SIZE; i++) memset (tb_hash, 0, CODE_GEN_HASH_SIZE * sizeof (void *));
tb_hash[i] = NULL;
virt_page_flush(); virt_page_flush();
for(i = 0;i < CODE_GEN_PHYS_HASH_SIZE; i++) memset (tb_phys_hash, 0, CODE_GEN_PHYS_HASH_SIZE * sizeof (void *));
tb_phys_hash[i] = NULL;
page_flush_tb(); page_flush_tb();
code_gen_ptr = code_gen_buffer; code_gen_ptr = code_gen_buffer;
...@@ -1279,8 +1276,7 @@ void tlb_flush(CPUState *env, int flush_global) ...@@ -1279,8 +1276,7 @@ void tlb_flush(CPUState *env, int flush_global)
} }
virt_page_flush(); virt_page_flush();
for(i = 0;i < CODE_GEN_HASH_SIZE; i++) memset (tb_hash, 0, CODE_GEN_HASH_SIZE * sizeof (void *));
tb_hash[i] = NULL;
#if !defined(CONFIG_SOFTMMU) #if !defined(CONFIG_SOFTMMU)
munmap((void *)MMAP_AREA_START, MMAP_AREA_END - MMAP_AREA_START); munmap((void *)MMAP_AREA_START, MMAP_AREA_END - MMAP_AREA_START);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册