hle: kernel: Provide methods for tracking dangling kernel objects.

This commit is contained in:
bunnei 2021-06-28 14:38:14 -07:00
parent def3f59ed9
commit a4b3202b65
4 changed files with 43 additions and 2 deletions

View file

@ -185,6 +185,14 @@ public:
/// Opens a port to a service previously registered with RegisterNamedService.
KClientPort* CreateNamedServicePort(std::string name);
/// Registers all kernel objects with the global emulation state, this is purely for tracking
/// leaks after emulation has been shutdown.
void RegisterKernelObject(KAutoObject* object);
/// Unregisters a kernel object previously registered with RegisterKernelObject when it was
/// destroyed during the current emulation session.
void UnregisterKernelObject(KAutoObject* object);
/// Determines whether or not the given port is a valid named port.
bool IsValidNamedPort(NamedPortTable::const_iterator port) const;