Reloaded.Memory
9.4.2
dotnet add package Reloaded.Memory --version 9.4.2
NuGet\Install-Package Reloaded.Memory -Version 9.4.2
<PackageReference Include="Reloaded.Memory" Version="9.4.2" />
paket add Reloaded.Memory --version 9.4.2
#r "nuget: Reloaded.Memory, 9.4.2"
// Install Reloaded.Memory as a Cake Addin #addin nuget:?package=Reloaded.Memory&version=9.4.2 // Install Reloaded.Memory as a Cake Tool #tool nuget:?package=Reloaded.Memory&version=9.4.2
<div align="center"> <h1>The Reloaded Memory Library</h1> <img src="https://raw.githubusercontent.com/Reloaded-Project/Reloaded.MkDocsMaterial.Themes.R2/adc12754862c5107fcd1357c7501e4d9d9f09d07/Images/Reloaded-Icon.png" width="150" align="center" /> <br/> <br/> <strong><i>Psssh, nothing personnel kid</i></strong> <br/> <br/>
<a href="https://codecov.io/gh/Reloaded-Project/Reloaded.Memory">
<img src="https://codecov.io/gh/Reloaded-Project/Reloaded.Memory/branch/master/graph/badge.svg" alt="Coverage" />
</a>
<a href="https://www.nuget.org/packages/Reloaded.Memory">
<img src="https://img.shields.io/nuget/v/Reloaded.Memory.svg" alt="NuGet" />
</a>
<a href="https://github.com/Reloaded-Project/Reloaded.Memory/actions/workflows/build-and-publish.yml">
<img src="https://img.shields.io/github/actions/workflow/status/Reloaded-Project/Reloaded.Memory/build-and-publish.yml" alt="Build Status" />
</a>
</div>
About
Reloaded.Memory is a high performance library which provides zero-cost abstractions
for memory manipulation in C#.
It is designed to be as fast as possible, with no overhead, while providing useful functionality to the user.
- Zero Cost Abstractions: Performance equivalent to using raw pointers.
- Stable API: Versions 9.0.0 and above have a fully stable, backwards compatible API.
- Trimming Safe: The library is fully compatible with .NET Core's Linker.
- Fully Documented: The library is fully tested & documented with XML comments.
- Cross Platform: 99% of the library is fully compatible with Windows, Linux and MacOS.
- Large Address Aware: The library can correctly leverage all 4GB in x86 processes.
This project guarantees binary backwards compatibility; meaning you can substitute the library with any newer version without recompiling the source code. Should the need to introduce any breaking changes occur; much like the runtime.
Common Utilities
Common Classes within this Package Include:
Memory Manipulation:
Action | Description |
---|---|
Memory |
Allows you to Read, Write, Allocate & Change Memory Protection for Current Process. |
ExternalMemory |
Read, Write, Allocate & Change Memory Protection but for Another Process. |
Streams Management:
Action | Description |
---|---|
BigEndian(Reader/Writer) |
Read/write raw data in memory as Big Endian. |
LittleEndian(Reader/Writer) |
Read/write raw data in memory as Little Endian. |
BufferedStreamReader |
High performance alternative to BinaryReader . |
Extensions:
Action | Description |
---|---|
(Array/Span)Extensions |
Unsafe slicing, references without bounds checks and SIMD accelerated extensions. |
StreamExtensions |
Extensions for reading and writing from/to generics. |
StringExtensions |
Custom Hash Function(s) and unsafe character references. |
Utilities:
Action | Description |
---|---|
ArrayRental & ArrayRentalSlice |
Safe wrapper around ArrayPool<T> rentals. |
Box<T> |
Represents a boxed value type, providing build-time validation and automatic unboxing. |
CircularBuffer |
Basic high-performance circular buffer. |
Pinnable<T> |
Utility for pinning C# objects for access from native code. |
Base building blocks:
Action | Description |
---|---|
Ptr<T> / MarshalledPtr<T> |
Abstraction over a pointer to arbitrary source. |
FixedArrayPtr<T> & MarshalledFixedArrayPtr<T> |
Abstraction over a pointer with known length. |
(This list is not exhaustive, please see the API Documentation for complete API)
Wiki & Documentation
For more information on how to use the library, please see the Wiki.
The wiki contains a lot of useful information on how to use the library, as well as many examples.
Community Feedback
If you have questions/bug reports/etc. feel free to Open an Issue.
Contributions are welcome and encouraged. Feel free to implement new features, make bug fixes or suggestions so long as they meet the quality standards set by the existing code in the repository.
For an idea as to how things are set up, see Reloaded Project Configurations.
Happy Hacking 💜
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.8
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
-
.NETStandard 2.0
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
-
.NETStandard 2.1
- System.Runtime.CompilerServices.Unsafe (>= 6.0.0)
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (15)
Showing the top 5 NuGet packages that depend on Reloaded.Memory:
Package | Downloads |
---|---|
NexusMods.Paths
Package Description |
|
Reloaded.Memory.Buffers
An implementation of efficient, shared, concurrent and permanent storage of objects in unmanaged memory in static, non-changing locations that last the lifetime of a given process. Allows allocating memory between a given minimum and maximum address. Useful stuff for DLL Injection and Hooking. |
|
NexusMods.MnemonicDB
Package Description |
|
NexusMods.MnemonicDB.Storage
Package Description |
|
Reloaded.Memory.Sigscan
Simple high performance byte pattern/PE signature scanner, allowing upwards of 2000MB/s per core on modern hardware. |
GitHub repositories (4)
Showing the top 4 popular GitHub repositories that depend on Reloaded.Memory:
Repository | Stars |
---|---|
goatcorp/Dalamud
FFXIV plugin framework and API
|
|
Reloaded-Project/Reloaded-II
Universal .NET Core Powered Modding Framework for any Native Game X86, X64.
|
|
Andy53/ERC.Xdbg
An Xdbg Plugin of the ERC Library.
|
|
PunishXIV/Artisan
A 'simple' crafting plugin.
|
Version | Downloads | Last updated |
---|---|---|
9.4.2 | 1,733 | 8/1/2024 |
9.4.1 | 54,651 | 3/13/2024 |
9.4.0 | 657 | 2/21/2024 |
9.3.2 | 1,708 | 11/17/2023 |
9.3.0 | 20,676 | 11/16/2023 |
9.2.0 | 688 | 11/5/2023 |
9.1.0 | 5,501 | 5/28/2023 |
9.0.1 | 208 | 5/26/2023 |
9.0.0 | 206 | 5/21/2023 |
8.1.0 | 1,012 | 2/8/2023 |
8.0.1 | 4,788 | 9/12/2022 |
8.0.0 | 514 | 9/8/2022 |
7.1.0 | 3,573 | 7/6/2022 |
7.0.0 | 22,424 | 6/18/2022 |
6.1.3 | 1,863 | 6/17/2022 |
6.1.1 | 451 | 6/15/2022 |
6.1.0 | 481 | 6/13/2022 |
6.0.0 | 460 | 6/13/2022 |
5.1.0 | 609 | 5/5/2022 |
5.0.0 | 487 | 5/2/2022 |
4.1.4 | 2,561 | 3/15/2022 |
4.1.3 | 1,194 | 9/10/2021 |
4.1.2 | 455 | 8/26/2021 |
4.1.1 | 3,712 | 2/1/2021 |
4.1.0 | 8,422 | 1/27/2021 |
4.0.1 | 406 | 1/27/2021 |
4.0.0 | 402 | 1/27/2021 |
3.1.1 | 545 | 1/1/2021 |
3.1.0 | 500 | 1/1/2021 |
3.0.2 | 482 | 12/13/2020 |
3.0.1 | 3,009 | 3/18/2020 |
3.0.0 | 526 | 3/17/2020 |
2.11.0 | 1,396 | 3/17/2020 |
2.10.0 | 676 | 2/16/2020 |
2.8.0 | 768 | 1/5/2020 |
2.7.0 | 732 | 1/5/2020 |
2.6.0 | 1,261 | 12/29/2019 |
2.5.2 | 672 | 12/29/2019 |
2.5.1 | 634 | 12/20/2019 |
2.5.0 | 16,109 | 10/14/2019 |
2.4.0 | 699 | 9/16/2019 |
2.3.0 | 597 | 9/8/2019 |
2.2.0 | 577 | 9/7/2019 |
2.1.0 | 596 | 9/7/2019 |
2.0.1 | 3,245 | 8/17/2019 |
2.0.0 | 576 | 8/17/2019 |
1.5.0 | 596 | 8/15/2019 |
1.4.1 | 4,973 | 6/29/2019 |
1.4.0 | 612 | 6/28/2019 |
1.3.1 | 765 | 6/23/2019 |
1.3.0 | 630 | 6/9/2019 |
1.2.2 | 8,988 | 4/26/2019 |
1.2.1 | 1,640 | 1/5/2019 |
1.2.0 | 927 | 12/31/2018 |
1.1.0 | 735 | 12/28/2018 |
1.0.3 | 2,869 | 12/21/2018 |
1.0.2 | 921 | 12/20/2018 |
1.0.1 | 966 | 12/18/2018 |