summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDrChat <arkolbed@gmail.com>2018-02-10 16:47:53 -0600
committerDrChat <arkolbed@gmail.com>2018-02-10 16:47:53 -0600
commit325599948a81f8389a2f3485a00c78c0e5cfe885 (patch)
treef9f4247087a3575182d4e196dd389043341fd113 /src
parent4db94473ec5095538b250a2c1f0f75a2f85e9b60 (diff)
[Core] Remove hardcoded type field from HeapAllocationInfo
Diffstat (limited to 'src')
-rw-r--r--src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc11
-rw-r--r--src/xenia/memory.cc2
-rw-r--r--src/xenia/memory.h2
3 files changed, 4 insertions, 11 deletions
diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc
index e397e53eb..0ef461683 100644
--- a/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc
+++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_memory.cc
@@ -273,14 +273,11 @@ dword_result_t NtQueryVirtualMemory(
return X_STATUS_INVALID_PARAMETER;
}
- memory_basic_information_ptr->base_address =
- static_cast<uint32_t>(alloc_info.base_address);
- memory_basic_information_ptr->allocation_base =
- static_cast<uint32_t>(alloc_info.allocation_base);
+ memory_basic_information_ptr->base_address = alloc_info.base_address;
+ memory_basic_information_ptr->allocation_base = alloc_info.allocation_base;
memory_basic_information_ptr->allocation_protect =
ToXdkProtectFlags(alloc_info.allocation_protect);
- memory_basic_information_ptr->region_size =
- static_cast<uint32_t>(alloc_info.region_size);
+ memory_basic_information_ptr->region_size = alloc_info.region_size;
uint32_t x_state = 0;
if (alloc_info.state & kMemoryAllocationReserve) {
x_state |= X_MEM_RESERVE;
@@ -290,7 +287,7 @@ dword_result_t NtQueryVirtualMemory(
}
memory_basic_information_ptr->state = x_state;
memory_basic_information_ptr->protect = ToXdkProtectFlags(alloc_info.protect);
- memory_basic_information_ptr->type = alloc_info.type;
+ memory_basic_information_ptr->type = X_MEM_PRIVATE;
return X_STATUS_SUCCESS;
}
diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc
index 221f97362..516c155e6 100644
--- a/src/xenia/memory.cc
+++ b/src/xenia/memory.cc
@@ -1096,14 +1096,12 @@ bool BaseHeap::QueryRegionInfo(uint32_t base_address,
out_info->region_size = 0;
out_info->state = 0;
out_info->protect = 0;
- out_info->type = 0;
if (start_page_entry.state) {
// Committed/reserved region.
out_info->allocation_base = start_page_entry.base_address * page_size_;
out_info->allocation_protect = start_page_entry.allocation_protect;
out_info->state = start_page_entry.state;
out_info->protect = start_page_entry.current_protect;
- out_info->type = 0x20000;
for (uint32_t page_number = start_page_number;
page_number < start_page_number + start_page_entry.region_page_count;
++page_number) {
diff --git a/src/xenia/memory.h b/src/xenia/memory.h
index 74f5f9568..8f5e3b535 100644
--- a/src/xenia/memory.h
+++ b/src/xenia/memory.h
@@ -63,8 +63,6 @@ struct HeapAllocationInfo {
uint32_t state;
// The access protection of the pages in the region.
uint32_t protect;
- // The type of pages in the region (private).
- uint32_t type;
};
// Describes a single page in the page table.