Просмотр исходного кода

address_space: Rename va_start to virt_start

Avoids conflicting with the va_start macro
Morph 4 лет назад
Родитель
Сommit
11e1cbbdbd
2 измененных файлов с 5 добавлено и 5 удалено
  1. 3 3
      src/common/address_space.h
  2. 2 2
      src/common/address_space.inc

+ 3 - 3
src/common/address_space.h

@@ -116,7 +116,7 @@ private:
     using Base = FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits>;
 
 public:
-    explicit FlatAllocator(VaType va_start, VaType va_limit = Base::VaMaximum);
+    explicit FlatAllocator(VaType virt_start, VaType va_limit = Base::VaMaximum);
 
     /**
      * @brief Allocates a region in the AS of the given size and returns its address
@@ -134,12 +134,12 @@ public:
     void Free(VaType virt, VaType size);
 
     VaType GetVAStart() const {
-        return va_start;
+        return virt_start;
     }
 
 private:
     /// The base VA of the allocator, no allocations will be below this
-    VaType va_start;
+    VaType virt_start;
 
     /**
      * The end address for the initial linear allocation pass

+ 2 - 2
src/common/address_space.inc

@@ -284,8 +284,8 @@ MAP_MEMBER(void)::UnmapLocked(VaType virt, VaType size) {
         unmap_callback(virt, size);
 }
 
-ALLOC_MEMBER_CONST()::FlatAllocator(VaType va_start_, VaType va_limit_)
-    : Base{va_limit_}, va_start{va_start_}, current_linear_alloc_end{va_start_} {}
+ALLOC_MEMBER_CONST()::FlatAllocator(VaType virt_start_, VaType va_limit_)
+    : Base{va_limit_}, virt_start{virt_start_}, current_linear_alloc_end{virt_start_} {}
 
 ALLOC_MEMBER(VaType)::Allocate(VaType size) {
     std::scoped_lock lock(this->block_mutex);