summaryrefslogtreecommitdiff
path: root/Source/Core/Common/MemoryUtil.cpp
AgeCommit message (Collapse)Author
2025-04-21MemoryUtil: Remove availability checks for macOS 11OatmealDome
2023-08-29Jit: Add more error checking to ProtectStackJosJuice
2023-04-15Embrace nullptr over NULL and 0get
2022-06-01MemoryUtil: Remove __builtin_available for macOS 10.14OatmealDome
2021-12-10Treewide: Adjust order of includesPokechu22
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-05-22Apple M1: x86_64 MAP_JITSkyler Saleh
- Enabled MAP_JIT on x86_64 after confirming that pthread_jit* calls are only required for MAP_JIT pages on Apple Silicon
2021-05-22Apple M1: MacOS 11.2 mprotect restrictionsSkyler Saleh
In MacOS 11.2 mprotect can no longer change the access protection settings of pages that were previously marked as executable to anything but PROT_NONE. This commit works around this new restriction by bypassing the mprotect based write protection and instead relying on the write protection provided by MAP_JIT.
2021-05-22Apple M1: OS version checking for MAP_JITSkyler Saleh
- Added MacOS version checking around MAP_JIT to prepare code for x86 MAP_JIT
2021-05-22Apple M1: Build, Analytics, and Memory ManagementSkyler Saleh
Analytics: - Incorporated fix to allow the full set of analytics that was recommended by spotlightishere BuildMacOSUniversalBinary: - The x86_64 slice for a universal binary is now built for 10.12 - The universal binary build script now can be configured though command line options instead of modifying the script itself. - os.system calls were replaced with equivalent subprocess calls - Formatting was reworked to be more PEP 8 compliant - The script was refactored to make it more modular - The com.apple.security.cs.disable-library-validation entitlement was removed Memory Management: - Changed the JITPageWrite*Execute*() functions to incorporate support for nesting Other: - Fixed several small lint errors - Fixed doc and formatting mistakes - Several small refactors to make things clearer
2021-05-22Apple M1 Support for MacOSSkyler Saleh
This commit adds support for compiling Dolphin for ARM on MacOS so that it can run natively on the M1 processors without running through Rosseta2 emulation providing a 30-50% performance speedup and less hitches from Rosseta2. It consists of several key changes: - Adding support for W^X allocation(MAP_JIT) for the ARM JIT - Adding the machine context and config info to identify the M1 processor - Additions to the build system and docs to support building universal binaries - Adding code signing entitlements to access the MAP_JIT functionality - Updating the MoltenVK libvulkan.dylib to a newer version with M1 support
2020-12-20MemoryUtil: Use HW_PHYSMEM64 sysctl in MemPhysicalMerryMage
HW_PHYSMEM is deprecated on OpenBSD and only supplies a 32-bit value on NetBSD
2020-12-15Add NetBSD supportDavid Carlier
2020-12-02General: Convert PanicAlerts over to fmt equivalentLioncash
Converts lingering panic alert calls over to the fmt-capable ones.
2020-10-23Common: Migrate logging to fmtLioncash
Continues the migration of our code over to the fmt logger.
2017-08-18CommonFuncs: LastStrerrorString addedSepalani
2017-06-08remove MemUsage, and therefor psapi dependencyShawn Hoffman
2017-05-20MemoryUtil: 0 -> nullptrJosJuice
2017-05-20Remove code for only allocating low memoryJosJuice
This is unnecessary when we have position-independent code.
2017-03-27Initial support for Haiku.Augustin Cavalier
2017-01-23Add includes for building on Windows without PCHMichael Maltese
2016-10-23Fix unused function warningsLéo Lam
2016-09-24MemoryUtil: Fix formattingLéo Lam
clang-format really *wants* the two empty lines to be removed; otherwise, it will always flag MemoryUtil as needing formatting changes which is an annoyance when it is used as a git filter driver.
2016-08-07Common: namespace MemoryUtilLioncash
2016-07-17OpenBSD has a custom sysctl for physical memory.Anthony J. Bentley
2016-06-26Get rid of #define PAGE_MASK and round_page, which conflict with OS X headerscomex
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-01-21Common: asterisks go against the type namemathieui
not the variable name
2015-09-11Partially revert "General: Toss out PRI macro usage"Lioncash
2015-06-13Fix FreeBSD buildJeffrey Pfau
2015-06-14Revert "x64: build a Position-Independent Executable (PIE)"Matthew Parlane
2015-06-03MemoryUtil: get executable pages near static dataTillmann Karras
and clean up a bit.
2015-05-26Merge pull request #2162 from degasus/prefetch_texMarkus Wick
CustomTexture: prefetch all available textures
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-16VideoCommon: Abort texture prefetching on low RAMdegasus
There is no nice way to correctly "detect" the "used" memory, so we just say we're fine to use 50% of the physical memory for custom textures. This will fix out-of-memory crashes, but we still might run into swapping issues.
2015-04-07Common: Remove TLS usage in GetLastErrorMsgdegasus
Just return std::string as this code isn't performance critical.
2015-02-25Formatting/Whitespace CleanupStevoisiak
Various fixes to formatting and whitespace
2015-01-18[Android] Remove posix_memalign workaround.Ryan Houdek
Google fixed the issue of posix_memalign not being available. It now works fine in r10d of the NDK.
2015-01-12MemoryUtil: mention Valgrind in mmap error messageTillmann Karras
2015-01-12MemoryUtil: add comment for ValgrindTillmann Karras
Valgrind doesn't support the mmap() flag MAP_32BIT. Adding a simple CMake option would force a recompile, so just add this comment.
2014-09-19Fix build failing when disabling precompiled headers.Rohit Nirmal
2014-09-17Be pedantic about stack overflow on Linux and OS X.comex
Add some magic to the fault handler to handle stack overflow due to BLR optimization, and disable the optimization if fastmem is not enabled.
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-08-10Core: Actually show MemoryUtil.cpp allocation error messages on LinuxLioncash
2014-08-10Core: Fix case where a panic alert wouldn't be shown in MemoryUtil.cppLioncash
2014-07-31Fixes a check for what mmap returns.Ryan Houdek
On error mmap returns MAP_FAILED(-1) not null. FreeBSD was checking the return correctly, Linux was not. This was noticed by triad attempting to run Dolphin under valgrind and not getting a memory space under the 2GB limit(Because -1 wraps around on unsigned obviously)
2014-07-11mark all local functions as staticdegasus
2014-06-01Make MemoryUtil.cpp use the correct x86_64 define.Ryan Houdek
MemoryUtil.cpp was incorrectly using the old __x86_64__ define when it should be using _M_X86_64. It was also using _ARCH_64 when it shouldn't have which was causing an errant PanicAlert to come up in my development.
2014-03-29Remove all trailing whitespaces from our codebase.Pierre Bourdon