mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 10:24:58 +00:00
kernel: Implement some functions
This commit is contained in:
parent
7bdaeafdfd
commit
2506a285f4
9 changed files with 69 additions and 12 deletions
|
@ -124,6 +124,14 @@ public:
|
|||
instance = instance_;
|
||||
}
|
||||
|
||||
void SetTotalFlexibleSize(u64 size) {
|
||||
total_flexible_size = size;
|
||||
}
|
||||
|
||||
u64 GetAvailableFlexibleSize() const {
|
||||
return total_flexible_size - flexible_usage;
|
||||
}
|
||||
|
||||
PAddr Allocate(PAddr search_start, PAddr search_end, size_t size, u64 alignment,
|
||||
int memory_type);
|
||||
|
||||
|
@ -195,7 +203,8 @@ private:
|
|||
DMemMap dmem_map;
|
||||
VMAMap vma_map;
|
||||
std::recursive_mutex mutex;
|
||||
size_t total_flexible_usage{};
|
||||
size_t total_flexible_size = 448_MB;
|
||||
size_t flexible_usage{};
|
||||
|
||||
struct MappedMemory {
|
||||
vk::UniqueBuffer buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue