ModernUO/Projects/UOContent
Kamron Batman 76fddcbccd
feat: Adds a single threaded array pool (#967)
## Added Feature
Adds a single threaded array pool that works exactly the same as `ArrayPool<T>.Shared`.
The `STArrayPool<T>.Shared` can only be used on a single thread, the main game thread of the server.

Note: Unlike the built-in array pool, there is no hook into the _GC Gen 2_. This means to relieve potentially high memory pressure, `ArrayPool<T>.Shared.Trim()` must be called. The pool will only release arrays _after two successive calls within 10 seconds or longer_. If the server is at less than 70% total memory usage, or the server is not going to use this pool for something egregious, then don't bother ever calling Trim().


## Changes
- [X] Fixes ArrayPool calls that should be cleared due to references.
- [X] Benchmarks against ArrayPool with 4+ rented arrays deep of the same length.
- [x] Unit tests
2022-03-22 09:58:24 -07:00
..
Accounting fix: Adds server access with protected accounts (#915) 2022-01-10 23:14:55 -08:00
Commands fix: Cleans up Point checks and removes statics (#966) 2022-03-20 23:15:59 -07:00
Compression fix: Removes duplicative spell checks (#849) 2021-11-14 18:45:16 -08:00
Configuration cleanup: Fixes bugs and cleans up code (#660) 2021-07-19 20:49:59 -07:00
Context Menus cleanup: Fixes bugs and cleans up code (#660) 2021-07-19 20:49:59 -07:00
Engines fix: Cleans up Point checks and removes statics (#966) 2022-03-20 23:15:59 -07:00
Gumps fix: Cleans up Point checks and removes statics (#966) 2022-03-20 23:15:59 -07:00
Holiday Stuff fix: Cleans up LINQ calls. (#965) 2022-03-20 19:20:54 -07:00
Items fix: Cleans up Point checks and removes statics (#966) 2022-03-20 23:15:59 -07:00
Json/Converters Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Migrations fix: Codegens treasure chests (#949) 2022-02-27 18:02:36 -08:00
Misc fix: Fixes packet length checks (#953) 2022-03-04 12:32:25 -08:00
Mobiles feat: Adds a single threaded array pool (#967) 2022-03-22 09:58:24 -07:00
Multis fix: Cleans up Point checks and removes statics (#966) 2022-03-20 23:15:59 -07:00
Network fix: Fixes packet length checks (#953) 2022-03-04 12:32:25 -08:00
Regions chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
Skills fix: Cleans up LINQ calls. (#965) 2022-03-20 19:20:54 -07:00
Special Systems fix: Fixes crash from bad input in TC (#909) 2022-01-03 14:22:58 -08:00
Spells fix: Cleans up LINQ calls. (#965) 2022-03-20 19:20:54 -07:00
Targets fix: Cleans up Point checks and removes statics (#966) 2022-03-20 23:15:59 -07:00
Utilities fix: Fixes string set in properties (#779) 2021-09-12 12:03:30 -07:00
World Saves feat: Updates to .NET 6 (#843) 2021-11-13 13:38:01 -08:00
UOContent.csproj fix: Moves codegen to its own repo (#918) 2022-02-12 17:58:42 -08:00