int main(int argc, char **argv) { cmdline_read(argc, argv); debug_init(); cpu_state_t *state = cpu_init(); cpu_start(state); cpu_delete(state); return 0; }
void vm_delete(VM* vm) { if (vm->cpus) { for (int i = 0; i < vm->num_cpus; i++) { if (vm->cpus[i]) cpu_delete(vm->cpus[i]); } IOFree(vm->cpus, sizeof(CPU*) * vm->num_cpus); } IOFree(vm, sizeof(VM)); LOG("destroyed VM"); }