0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-23 07:05:45 +00:00
ryujinx-fork/Ryujinx.Memory
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
..
Range Update range for remapped sparse textures instead of recreating them (#4442) 2023-03-14 17:08:44 -03:00
Tracking Clear CPU side data on GPU buffer clears (#4125) 2023-02-16 18:28:49 -03:00
WindowsShared Replace DllImport usage with LibraryImport (#4084) 2022-12-15 18:07:31 +01:00
AddressSpaceManager.cs Clear CPU side data on GPU buffer clears (#4125) 2023-02-16 18:28:49 -03:00
InvalidAccessHandler.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
InvalidMemoryRegionException.cs Update InvalidMemoryRegionException.cs to abide by English rules. (#1834) 2020-12-25 04:09:02 +01:00
IRefCounted.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
IVirtualMemoryManager.cs Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
IWritableBlock.cs Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494) 2021-07-19 19:10:54 -03:00
MemoryAllocationFlags.cs Implement JIT Arm64 backend (#4114) 2023-01-10 19:16:59 -03:00
MemoryBlock.cs Implement support for page sizes > 4KB (#4252) 2023-01-17 05:13:24 +01:00
MemoryConstants.cs Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
MemoryManagement.cs Implement JIT Arm64 backend (#4114) 2023-01-10 19:16:59 -03:00
MemoryManagementUnix.cs Implement JIT Arm64 backend (#4114) 2023-01-10 19:16:59 -03:00
MemoryManagementWindows.cs Move partial unmap handler to the native signal handler (#3437) 2022-07-29 19:16:29 -03:00
MemoryManagerUnixHelper.cs Implement JIT Arm64 backend (#4114) 2023-01-10 19:16:59 -03:00
MemoryMapFlags.cs Implement support for page sizes > 4KB (#4252) 2023-01-17 05:13:24 +01:00
MemoryNotContiguousException.cs IPC refactor part 2: Use ReplyAndReceive on HLE services and remove special handling from kernel (#1458) 2020-12-02 00:23:43 +01:00
MemoryPermission.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
MemoryProtectionException.cs Implement a new physical memory manager and replace DeviceMemory (#856) 2020-05-04 08:54:50 +10:00
NativeMemoryManager.cs POWER - Performance Optimizations With Extensive Ramifications (#2286) 2021-05-24 22:52:44 +02:00
PageTable.cs Support memory aliasing (#2954) 2022-05-02 20:30:02 -03:00
Ryujinx.Memory.csproj infra: Migrate to .NET 7 (#3795) 2022-11-09 20:22:43 +01:00
WritableRegion.cs Return mapped buffer pointer directly for flush, WriteableRegion for textures (#2494) 2021-07-19 19:10:54 -03:00