Memory: Make PhysicalToVirtualAddress return a boost::optional
And fix a few places in the code to take advantage of that.
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <boost/optional.hpp>
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace Memory {
|
||||
@ -154,9 +155,9 @@ std::string ReadCString(VAddr virtual_address, std::size_t max_length);
|
||||
PAddr VirtualToPhysicalAddress(VAddr addr);
|
||||
|
||||
/**
|
||||
* Undoes a mapping performed by VirtualToPhysicalAddress().
|
||||
*/
|
||||
VAddr PhysicalToVirtualAddress(PAddr addr);
|
||||
* Undoes a mapping performed by VirtualToPhysicalAddress().
|
||||
*/
|
||||
boost::optional<VAddr> PhysicalToVirtualAddress(PAddr addr);
|
||||
|
||||
/**
|
||||
* Gets a pointer to the memory region beginning at the specified physical address.
|
||||
|
Reference in New Issue
Block a user