فهرست منبع

VMManager: Change block offsets to size_t

Yuri Kunde Schlesner 11 سال پیش
والد
کامیت
785407d06f
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 1 1
      src/core/hle/kernel/vm_manager.cpp
  2. 2 2
      src/core/hle/kernel/vm_manager.h

+ 1 - 1
src/core/hle/kernel/vm_manager.cpp

@@ -55,7 +55,7 @@ VMManager::VMAHandle VMManager::FindVMA(VAddr target) const {
 }
 }
 
 
 ResultVal<VMManager::VMAHandle> VMManager::MapMemoryBlock(VAddr target,
 ResultVal<VMManager::VMAHandle> VMManager::MapMemoryBlock(VAddr target,
-        std::shared_ptr<std::vector<u8>> block, u32 offset, u32 size, MemoryState state) {
+        std::shared_ptr<std::vector<u8>> block, size_t offset, u32 size, MemoryState state) {
     ASSERT(block != nullptr);
     ASSERT(block != nullptr);
     ASSERT(offset + size <= block->size());
     ASSERT(offset + size <= block->size());
 
 

+ 2 - 2
src/core/hle/kernel/vm_manager.h

@@ -75,7 +75,7 @@ struct VirtualMemoryArea {
     /// Memory block backing this VMA.
     /// Memory block backing this VMA.
     std::shared_ptr<std::vector<u8>> backing_block = nullptr;
     std::shared_ptr<std::vector<u8>> backing_block = nullptr;
     /// Offset into the backing_memory the mapping starts from.
     /// Offset into the backing_memory the mapping starts from.
-    u32 offset = 0;
+    size_t offset = 0;
 
 
     // Settings for type = BackingMemory
     // Settings for type = BackingMemory
     /// Pointer backing this VMA. It will not be destroyed or freed when the VMA is removed.
     /// Pointer backing this VMA. It will not be destroyed or freed when the VMA is removed.
@@ -141,7 +141,7 @@ public:
      * @param state MemoryState tag to attach to the VMA.
      * @param state MemoryState tag to attach to the VMA.
      */
      */
     ResultVal<VMAHandle> MapMemoryBlock(VAddr target, std::shared_ptr<std::vector<u8>> block,
     ResultVal<VMAHandle> MapMemoryBlock(VAddr target, std::shared_ptr<std::vector<u8>> block,
-            u32 offset, u32 size, MemoryState state);
+            size_t offset, u32 size, MemoryState state);
 
 
     /**
     /**
      * Maps an unmanaged host memory pointer at a given address.
      * Maps an unmanaged host memory pointer at a given address.