Commit Graph

43 Commits

Author SHA1 Message Date
Henrik Rydgard
f39c603acb Move memory protect logging to VERBOSE level. See #8941 (probably something else going on though) 2016-09-04 16:35:23 +02:00
Henrik Rydgard
dde50cbdf5 Remove checks for various iOS non-jit situations in settings 2016-08-28 19:01:00 +02:00
Unknown W. Brackets
2fd81a4b29 Fix typo. 2016-08-28 09:44:52 -07:00
Henrik Rydgard
740ef4e0eb Apple buildfix 2016-08-28 18:41:24 +02:00
Henrik Rydgard
3ab2094b76 Buildfix attempt 2016-08-28 18:35:57 +02:00
Henrik Rydgard
2a4f4ed41d iOS buildfix, fix another comment 2016-08-28 18:10:26 +02:00
Henrik Rydgard
1e4b77fb49 Use PAGE_SIZE, fix a comment, fix some indentation. 2016-08-28 18:07:54 +02:00
Henrik Rydgard
d82ba24485 Symbian buildfix 2016-08-28 15:07:33 +02:00
Henrik Rydgard
b264657d56 Implement W^X-compatible path. Works on Windows and Android, hopefully iOS (untested).
Disabled block linking in this mode, can re-enable with some more work later.

To enable W^X on other platforms than iOS, simply change PlatformIsWXExclusive.
2016-08-28 14:52:08 +02:00
Henrik Rydgard
323eb72b7c Write-protect the dispatcher on all platforms. 2016-08-28 13:35:27 +02:00
Henrik Rydgard
5005e83254 Consistency improvements to the memory protect/alloc APIs 2016-08-28 12:28:17 +02:00
Henrik Rydgard
adbac55b1d Replace Write/UnWriteProtectMemory with ProtectMemory that takes flags 2016-08-28 12:09:01 +02:00
Henrik Rydgard
c8457d39ed Fix a bunch of compiler warnings, delete some unused code 2016-03-13 15:17:31 +01:00
Unknown W. Brackets
f3a616df24 Jit: Properly re-allocate when jit is freed a lot.
Fixes #8334.
2016-01-02 13:24:58 -08:00
Unknown W. Brackets
935b802dad Reset memory alloc pointer when jit alloc fails.
On Windows x64, we keep track of our last allocation.  Once we run out of
our 2GB range, we need to start over or it'll just fail.

Fixes #8021.
2015-10-10 09:07:34 -07:00
Henrik Rydgard
fdea85138c Update project files, fix minor issues for VS 2015 2015-09-06 19:32:15 +02:00
Jan Beich
2eb1d578dd Common: check against MAP_FAILED on every Unix after mmap()
This is required by POSIX but may matter only in MAX_FIXED case.
2015-05-26 15:20:11 +03:00
Toad King
91cb8ea1c9 typo 2014-08-31 23:53:48 -04:00
Toad King
b98c79bd0a fix 32-bit builds 2014-08-06 22:02:45 -04:00
Toad King
9f24203ef8 executable memory allocation changes 2014-08-06 21:06:49 -04:00
Toad King
aa0b4964ed Try to allocate executable memory close to PPSSPP memory if not below 4GB 2014-08-05 18:45:19 -04:00
Ced2911
418d2ac8ce [xbox] 360 support for common 2014-03-02 12:15:10 -08:00
Sacha
d50b01a778 Doesn't really 'free', so called 'reset' instead. 2013-11-12 02:13:34 +10:00
Sacha
3bc8adf426 Fix crashes on Symbian related to memory allocation. 2013-11-12 02:06:12 +10:00
Sacha
2c795907b2 Symbian: Handle multiple executable memory allocations.
Windows: Remove MemUsage (from Dolphin) as it was unused.
Fix some tabbing.
2013-11-11 02:55:45 +10:00
adrian17
5f86bc44d4 Deleted some doubled #includes. 2013-09-27 21:38:07 +02:00
Unknown W. Brackets
7b7801d59a Switch to including Windows.h from an intermediate.
This makes it easier for Xbox which uses a separate header.
2013-07-28 21:04:19 -07:00
Henrik Rydgard
7dac11922d Some minor optimization of audio channel queues and mixing 2013-06-19 12:00:24 +02:00
Sacha
2396574f45 Avoid name collision with StringUtil on Windows hosts. Fixes all Linux/Unix cross-compiles from Windows, including Harmattan and Blackberry. 2013-05-03 16:22:15 +10:00
Sacha
f88bf8bbff Attempt at fixing JIT on iOS. Can only have PROT_WRITE or PROT_EXEC enabled. So toggle between them as needed. 2013-03-14 14:40:01 +10:00
Unknown W. Brackets
7abcd37909 This isn't needed if ABI_CallFunction* is used.
AFAICT the only reason for it is to avoid far calls, so we just can't
use CALL() directly.  It's works even when it throws on Mac.
2013-02-24 00:15:56 -08:00
Sacha
8e88cc37d2 Fix crash on Return to Menu in Symbian.
We don't want to free the executable code (actually a Chunk+Heap) using same method we use to free memory pages (delete).
This would be the same situation on jailbroken iOS and WP.
Now the JIT code is always allocated and never freed on Symbian.
2013-02-21 15:59:02 +10:00
Sacha
6d63403f69 Fix memory management for allocated block on Symbian. TODO: Use RChunks to make it more efficient. 2013-02-01 02:30:27 +10:00
Summeli
abb09092d2 fixed null ptr bug in Symbian 2013-01-24 23:15:20 +02:00
Summeli
1e8253f1c8 Modified memorymanagement for JIT in Symbian 2013-01-08 19:04:25 +02:00
Mathias Tillman
b780e39397 Fixed various potential bugs and compiler warnings 2013-01-07 15:57:19 +01:00
Sacha
ae7d6c0c2f Update Qt project/Symbian 2012-12-25 09:13:50 +10:00
Sacha
f7878c8351 Get Symbian running again 2012-12-24 03:19:52 +10:00
Sacha
a1781b854a Symbian support for project.
New UNUSABLE_MMAP code path for platforms that cannot use the required flags (Xbox 360, Symbian). Falls back to malloc() instead.
N1 define for compilers (GCCE) that don't like to assume (int)-1 will safely cast to (char)-1.
Miscellaneous space->tab fixes.
2012-12-13 13:15:20 +10:00
Henrik Rydgård
fc453c979f MacOSX buildfix. Doesn't run right yet though. 2012-11-25 12:25:07 +01:00
Diogo Franco (Kovensky)
6108e36ae9 Several fixes to build under stricter C++11
Add missing #include to various files.

strings.h isn't provided by MSVC so we don't include it there; it's needed
for other OSes/compilers.

Get rid of pre-ISO-C malloc.h includes; malloc is provided by stdlib.h.

Fixes some linuxisms.

Prepend __builtin_ to __clear_cache, calling it without the prefix is a
GNU extension.
2012-11-21 14:33:50 -03:00
Henrik Rydgard
64cc573703 Switch to "GPL 2.0 or later" for various reasons. I wrote most of the code I imported from Dolphin (which is GPL2-but-not-later), so it should be OK. 2012-11-04 23:24:00 +01:00
Henrik Rydgard
4f7ad15758 Add snapshot of the whole source code. 2012-11-01 16:19:01 +01:00