HW/Memmap: Zero-initialize members by default.

This commit is contained in:
Admiral H. Curtiss 2023-01-06 04:28:58 +01:00
parent fbcaf83d30
commit d33416fc35
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 17 additions and 17 deletions

View File

@ -155,28 +155,28 @@ private:
u8* m_logical_page_mappings_base = nullptr;
// The actual memory used for backing the memory map.
u8* m_ram;
u8* m_exram;
u8* m_l1_cache;
u8* m_fake_vmem;
u8* m_ram = nullptr;
u8* m_exram = nullptr;
u8* m_l1_cache = nullptr;
u8* m_fake_vmem = nullptr;
// m_ram_size is the amount allocated by the emulator, whereas m_ram_size_real
// is what will be reported in lowmem, and thus used by emulated software.
// Note: Writing to lowmem is done by IPL. If using retail IPL, it will
// always be set to 24MB.
u32 m_ram_size_real;
u32 m_ram_size;
u32 m_ram_mask;
u32 m_fakevmem_size;
u32 m_fakevmem_mask;
u32 m_l1_cache_size;
u32 m_l1_cache_mask;
u32 m_ram_size_real = 0;
u32 m_ram_size = 0;
u32 m_ram_mask = 0;
u32 m_fakevmem_size = 0;
u32 m_fakevmem_mask = 0;
u32 m_l1_cache_size = 0;
u32 m_l1_cache_mask = 0;
// m_exram_size is the amount allocated by the emulator, whereas m_exram_size_real
// is what gets used by emulated software. If using retail IOS, it will
// always be set to 64MB.
u32 m_exram_size_real;
u32 m_exram_size;
u32 m_exram_mask;
u32 m_exram_size_real = 0;
u32 m_exram_size = 0;
u32 m_exram_mask = 0;
bool m_is_fastmem_arena_initialized = false;
@ -231,12 +231,12 @@ private:
//
// TODO: The actual size of RAM is 24MB; the other 8MB shouldn't be backed by actual memory.
// TODO: Do we want to handle the mirrors of the GC RAM?
std::array<PhysicalMemoryRegion, 4> m_physical_regions;
std::array<PhysicalMemoryRegion, 4> m_physical_regions{};
std::vector<LogicalMemoryView> m_logical_mapped_entries;
std::array<void*, PowerPC::BAT_PAGE_COUNT> m_physical_page_mappings;
std::array<void*, PowerPC::BAT_PAGE_COUNT> m_logical_page_mappings;
std::array<void*, PowerPC::BAT_PAGE_COUNT> m_physical_page_mappings{};
std::array<void*, PowerPC::BAT_PAGE_COUNT> m_logical_page_mappings{};
void InitMMIO(bool is_wii);
};