Ryujinx/Ryujinx.HLE/HOS/Kernel/Common
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
..
IKFutureSchedulerObject.cs Refactor SVC handler (#540) 2018-12-18 03:33:36 -02:00
KAutoObject.cs IPC refactor part 3+4: New server HIPC message processor (#4188) 2023-01-04 23:15:45 +01:00
KernelInit.cs IPC refactor part 3+4: New server HIPC message processor (#4188) 2023-01-04 23:15:45 +01:00
KernelTransfer.cs kernel: A bit of refactoring and fix GetThreadContext3 correctness (#3042) 2022-01-29 22:18:03 +01:00
KResourceLimit.cs IPC refactor part 3+4: New server HIPC message processor (#4188) 2023-01-04 23:15:45 +01:00
KSynchronizationObject.cs Move kernel state out of the Horizon class (#1107) 2020-05-04 13:41:29 +10:00
KSystemControl.cs Update units of memory from decimal to binary prefixes (#3716) 2022-11-16 23:27:42 +01:00
KTimeManager.cs Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
LimitableResource.cs Refactor SVC handler (#540) 2018-12-18 03:33:36 -02:00
MemoryArrange.cs Update units of memory from decimal to binary prefixes (#3716) 2022-11-16 23:27:42 +01:00
MemroySize.cs Update units of memory from decimal to binary prefixes (#3716) 2022-11-16 23:27:42 +01:00
MersenneTwister.cs Removed unused usings. (#3593) 2022-08-18 18:04:54 +02:00