mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 06:43:17 +00:00
improved StringUtil algo + some PhysicalMemory work
This commit is contained in:
parent
818e0b7404
commit
692759099f
6 changed files with 42 additions and 21 deletions
0
src/Core/PS4/HLE/Kernel/PhysicalMemory.cpp
Normal file
0
src/Core/PS4/HLE/Kernel/PhysicalMemory.cpp
Normal file
15
src/Core/PS4/HLE/Kernel/PhysicalMemory.h
Normal file
15
src/Core/PS4/HLE/Kernel/PhysicalMemory.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
namespace HLE::Libs::LibKernel::MemoryManagement {
|
||||
|
||||
class PysicalMemory {
|
||||
struct AllocatedBlock {
|
||||
u64 start_addr;
|
||||
u64 size;
|
||||
};
|
||||
|
||||
private:
|
||||
std::vector<AllocatedBlock> m_allocatedBlocks;
|
||||
};
|
||||
|
||||
} // namespace HLE::Libs::LibKernel::MemoryManagement
|
|
@ -427,7 +427,7 @@ void Linker::LoadSymbols(Module* m)
|
|||
sym++)
|
||||
{
|
||||
std::string id = std::string(m->dynamic_info->str_table + sym->st_name);
|
||||
auto ids = StringUtil::split(id, '#');
|
||||
auto ids = StringUtil::split_string(id, '#');
|
||||
if (ids.size() == 3)//symbols are 3 parts name , library , module
|
||||
{
|
||||
const auto* library = FindLibrary(*m, ids.at(1));
|
||||
|
@ -590,7 +590,7 @@ void Linker::Relocate(Module* m)
|
|||
|
||||
|
||||
void Linker::Resolve(const std::string& name, int Symtype, Module* m, SymbolRecord* return_info) {
|
||||
auto ids = StringUtil::split(name, '#');
|
||||
auto ids = StringUtil::split_string(name, '#');
|
||||
|
||||
if (ids.size() == 3) // symbols are 3 parts name , library , module
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue