mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
improved StringUtil algo + some PhysicalMemory work
This commit is contained in:
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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user