1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-23 03:52:02 +00:00
Ryujinx/Ryujinx.HLE/HOS/Applets/Controller
jhorv 5131b71437
Reducing memory allocations (#4537)
* add RecyclableMemoryStream dependency and MemoryStreamManager

* organize BinaryReader/BinaryWriter extensions

* add StreamExtensions to reduce need for BinaryWriter

* simple replacments of MemoryStream with RecyclableMemoryStream

* add write ReadOnlySequence<byte> support to IVirtualMemoryManager

* avoid 0-length array creation

* rework IpcMessage and related types to greatly reduce memory allocation by using RecylableMemoryStream, keeping streams around longer, avoiding their creation when possible, and avoiding creation of BinaryReader and BinaryWriter when possible

* reduce LINQ-induced memory allocations with custom methods to query KPriorityQueue

* use RecyclableMemoryStream in StreamUtils, and use StreamUtils in EmbeddedResources

* add constants for nanosecond/millisecond conversions

* code formatting

* XML doc adjustments

* fix: StreamExtension.WriteByte not writing non-zero values for lengths <= 16

* XML Doc improvements. Implement StreamExtensions.WriteByte() block writes for large-enough count values.

* add copyless path for StreamExtension.Write(ReadOnlySpan<int>)

* add default implementation of IVirtualMemoryManager.Write(ulong, ReadOnlySequence<byte>); remove previous explicit implementations

* code style fixes

* remove LINQ completely from KScheduler/KPriorityQueue by implementing a custom struct-based enumerator
2023-03-17 13:14:50 +01:00
..
ControllerApplet.cs Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
ControllerAppletUiArgs.cs Improve multi-controller support in HID and Controller Applet (#1453) 2020-08-23 22:54:11 +02:00
ControllerSupportArgHeader.cs hle: Make Ryujinx.HLE project entirely safe (#2789) 2021-11-01 19:38:13 -03:00
ControllerSupportArgPrivate.cs Suppress CS0169 CS0649 warns from HID structs (#1222) 2020-05-10 16:02:41 +02:00
ControllerSupportArgV7.cs Rename ToSpan to AsSpan (#3556) 2022-08-11 18:07:37 -03:00
ControllerSupportArgVPre7.cs Rename ToSpan to AsSpan (#3556) 2022-08-11 18:07:37 -03:00
ControllerSupportMode.cs HID SharedMem Rework (#1003) 2020-04-03 11:10:02 +11:00
ControllerSupportResultInfo.cs hle: Make Ryujinx.HLE project entirely safe (#2789) 2021-11-01 19:38:13 -03:00