obhq / obliteration

Experimental PS4 emulator written in Rust for Windows, macOS and Linux
https://obliteration.net
MIT License
581 stars 17 forks source link

Adds lifetime to IoCmd, init ipmi commands #869

Closed SuchAFuriousDeath closed 1 month ago

SuchAFuriousDeath commented 1 month ago

@ultimaweapon Does it make sense for a each process to have it's own instance of Vm? shouldn't it be inside of the ProcManager?

ultimaweapon commented 1 month ago

That is not possible on macOS. It also seems like not a good idea since the amount of process may be hundred.

SuchAFuriousDeath commented 1 month ago

If it doesn't make sense... why is it that way in the code? :eyes:

SuchAFuriousDeath commented 1 month ago

Well... I suppose it made sense with only one process

ultimaweapon commented 1 month ago

If it doesn't make sense... why is it that way in the code? 👀

What do you mean by that? Our code current have a single VM that will be hosting multiple processes.

SuchAFuriousDeath commented 1 month ago

I mean the Vm struct

ultimaweapon commented 1 month ago

In that case yes, each process will have only one. I believed the reason FreeBSD put this as a top-level is because the VM can live alone without a process. The process is just one of a thing that depend on the VM. So I think it is better to keep it on a top-level.

SuchAFuriousDeath commented 1 month ago

I'm not sure I can make us run in a VM. Maybe you have to do it