-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for PhysicalMemory SVCs #503
Comments
Well, it seems that now Mesosphère is close to being unconditionally enabled.. Can you please look at this? It seems that it might break a lot of stuff... Heap overrides are already in the ABI... Also a relevant place to look at: https://github.com/devkitPro/newlib/blob/devkitA64/libgloss/libsysbase/sbrk.c. sbrk emulation for windows using virtual memory APIs in newlib: https://github.com/devkitPro/newlib/blob/a60a4501b77dca8f30e01327b96171ee89c278f7/newlib/libc/stdlib/mallocr.c#L1170 (may be used as reference if & when implementing sbrk emulation). Just FYI: I would like to help with implementation of this if it would be of any use. |
Hello, I was wondering if there was an update to this? It would be nice to be able to use generic virtual memory in homebrew applications to align with PC counterparts like VirtualAlloc/mmap (that said, I haven't wrapped my head around SVC call stuff, so this might not even be what I think it is) |
Yes, having mmap is somestging I do need for a port of X-Ray game engine (open source version of famous S.T.A.L.K.E.R game engine). Would you provide any update please? |
In version 3.0 of the Horizon kernel, new memory management SVCs were added. These essentially implement a new, more flexible take on heap management. Newer official software is known to take advantage of this improved heap management system. As a result, it would be desirable to add support for PhysicalMemory SVCs to libnx so that homebrew can take advantage of it.
Adding support involves redesigning how libnx applications interact with the homebrew environment (specifically nx-hbloader), and also figuring out a way to fall back on older style svcSetHeapSize heap management on systems running older Horizon kernels. Also note that Mesosphère implements all newer Horizon kernel functionality regardless of the installed firmware version; and a future version of Atmosphère will unconditionally have Mesosphère enabled, therefore making this a non-issue.
The text was updated successfully, but these errors were encountered: