Skip to content

Commit

Permalink
Core: Remove leftover Windows 32-bit functions in MemArena.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lioncash committed Aug 10, 2014
1 parent 2ff44b5 commit eb10899
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions Source/Core/Common/MemArena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,7 @@ u8* MemArena::Find4GBBase()
return reinterpret_cast<u8*>(0x2300000000ULL);
#endif

#else
// 32 bit
#ifdef _WIN32
// The highest thing in any 1GB section of memory space is the locked cache. We only need to fit it.
u8* base = (u8*)VirtualAlloc(0, 0x31000000, MEM_RESERVE, PAGE_READWRITE);
if (base) {
VirtualFree(base, 0, MEM_RELEASE);
}
return base;
#else
#else // 32 bit
#ifdef ANDROID
// Android 4.3 changed how mmap works.
// if we map it private and then munmap it, we can't use the base returned.
Expand All @@ -168,7 +159,6 @@ u8* MemArena::Find4GBBase()
munmap(base, MemSize);
return static_cast<u8*>(base);
#endif
#endif
}


Expand Down Expand Up @@ -257,23 +247,6 @@ u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena
exit(0);
return nullptr;
}
#else
#ifdef _WIN32
// Try a whole range of possible bases. Return once we got a valid one.
u32 max_base_addr = 0x7FFF0000 - 0x31000000;
u8 *base = nullptr;

for (u32 base_addr = 0x40000; base_addr < max_base_addr; base_addr += 0x40000)
{
base_attempts++;
base = (u8 *)base_addr;
if (Memory_TryBase(base, views, num_views, flags, arena))
{
INFO_LOG(MEMMAP, "Found valid memory base at %p after %i tries.", base, base_attempts);
base_attempts = 0;
break;
}
}
#else
// Linux32 is fine with the x64 method, although limited to 32-bit with no automirrors.
u8 *base = MemArena::Find4GBBase();
Expand All @@ -285,7 +258,6 @@ u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena
}
#endif

#endif
if (base_attempts)
PanicAlert("No possible memory base pointer found!");
return base;
Expand Down

4 comments on commit eb10899

@PatrickvL
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit late to the party, but : Does this commit mean Dolphin doesn't work on 32 bit Windows anymore?

I ask, because the current state of MemArena does seem to imply that too..

Also, if 32 bit windows is indeed not supported anymore, I wonder why there's still an installer being offered?

@JosJuice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32-bit support has been dropped: https://dolphin-emu.org/blog/2014/05/19/obituary-32bit/

We aren't offering 32-bit installers, except for versions that were released before we dropped support, such as 4.0.

@degasus
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to compile dolphin for 32bit on your own, but it will be interpreter only. So support was dropped a while ago.

@PatrickvL
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for both quick responses!

Please sign in to comment.