summaryrefslogtreecommitdiff
path: root/Source/Core/Common/MemArena.cpp
AgeCommit message (Collapse)Author
2016-01-21More asterisksmathieui
2016-01-21Common: asterisks go against the type namemathieui
not the variable name
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-06-13Common: Use more portable invocation of shm_openJeffrey Pfau
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-02-11Make address translation respect the CPU translation mode.magumagu
The PowerPC CPU has bits in MSR (DR and IR) which control whether addresses are translated. We should respect these instead of mixing physical addresses and translated addresses into the same address space. This is mostly mass-renaming calls to memory accesses APIs from places which expect address translation to use a different version from those which do not expect address translation. This does very little on its own, but it's the first step to a correct BAT implementation.
2014-12-01Common: Remove goto in MemArena.Rohit Nirmal
2014-11-03Common: Fix -Wmaybe-uninitialized warning.Rohit Nirmal
2014-11-03MemArena: Fix the launching of non-Wii gamesJasper St. Pierre
When we cleaned up the code to calculate the shm_position and total_mem in one step, we sometimes skipped over certain views because they were Wii-only. When looking at the total memory, we'd look at the last field, whether or not it was skipped. Since Wii-only fields are the last view, this meant that the shm_position was 0, since it was skipped, causing us to map a 0-sized field. Fix this by explicitly returning the total size from MemoryMap_InitializeViews. Additionally, the shm_position was being calculated incorrectly because it was adding up the shm_position *before* the mirror, rather than after it. Fix this by adopting a scheme similar to what we had before.
2014-11-02MemArena: Merge the initialization code with the size calculation codeJasper St. Pierre
To make mistakes like in the previous commit less prevalent in the future.
2014-11-02MemArena: Fix the calculation of position in SHMJasper St. Pierre
The code to calculate the offsets into the SHM file wasn't properly respecting the skip flags, causing it to calculate offsets beyond the end of the SHM file.
2014-11-02MemArena: Fix a memory leak caused by pointer confusionJasper St. Pierre
This code was ported from out_ptr, which was a double-pointer, and wanted to double-check that the proper arena was actually allocated. When I ported it to store the pointer directly in the view regardless of whether out_ptr was non-NULL, I got confused here and instead caused the code to only free the arena if the first byte was non-zero.
2014-11-02MemArena: Rename GrabLowMemSpace to GrabSHMSegmentJasper St. Pierre
This code originally tried to map the "low space" for the Gamecube's memory layout, but since has expanded to mapping all of the easily mappable memory on the system. Change the name to "GrabSHMSegment" to indicate that we're looking for a shared memory segment we can map into our process space.
2014-11-02MemArena: Clean up the code that does the mirroringJasper St. Pierre
2014-11-02MemArena: Remove the low mappings for our pointersJasper St. Pierre
These are effectively unused, since the memmap already maps them in one place. For 32-bit, they might have some slight advantage, but we already special-case the regular "high-mem" pointer for 32-bit, so just use the one we already have...
2014-11-02MemArena: Bail on Arch64 if the out_ptr allocation failsJasper St. Pierre
2014-11-02MemArena: Remove duplicated codeJasper St. Pierre
I can't find any obvious difference between these two paths.
2014-09-22Android: Silence some more warnings.Rohit Nirmal
2014-09-10Merge pull request #1027 from rohit-n/change-includeRyan Houdek
Include CommonTypes.h instead of Common.h.
2014-09-08Common: Remove unused variable in MemoryMap_SetupLioncash
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-08-30Common: Clean up brace placementsLioncash
2014-08-10Core: Remove leftover Windows 32-bit functions in MemArena.cppLioncash
2014-03-09clang-modernize -use-nullptrTillmann Karras
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-04Make our architecture defines less stupid.Ryan Houdek
Our defines were never clear between what meant 64bit or x86_64 This makes a clear cut between bitness and architecture. This commit also has the side effect of bringing up aarch64 compiling support.
2014-02-28Various changes suggested by cppcheckTillmann Karras
- remove unused variables - reduce the scope where it makes sense - correct limits (did you know that strcat()'s last parameter does not include the \0 that is always added?) - set some free()'d pointers to NULL
2014-02-22Make Common/ mostly IWYU clean (and fix errors in rest of the project ↵Pierre Bourdon
detected by this change).
2014-02-18Convert all includes to relative paths.Lioncash
2014-02-10Some tidy up of sprintf to StringFromFormatMatthew Parlane
Includes a small fix to SetupWiiMemory
2014-02-09Revert "Merge pull request #49 from Parlane/sprintf_tidy"Pierre Bourdon
Change broke the build on Debian stable. This reverts commit 28755439b36ac8e875d764da5db31ad693459ace, reversing changes made to 64e01ec763d21915e7166e625f8a3e85b46fbcbb.
2014-02-08Some tidy up of sprintf to StringFromFormatMatthew Parlane
2013-12-31Remove unnecessary Src/ foldersJasper St. Pierre