Stefan Nikolei
8930d4fd6f
Migrate to xUnitV3
2 weeks ago
Stefan Nikolei
eb549bcda3
Use Collection expressions and Target-typed new
1. Collection expressions (`[]` syntax) replacing `new List<T>()`, `new T[] {}`, `.ToArray()`, etc.
2. Target-typed `new()` expressions where appropriate
3. Using spread elements (`[.. collection]`) instead of `.ToArray()` and `.Concat().ToArray()`
4. Adding `#pragma warning disable/restore CS0649` for intentionally unassigned struct fields
2 weeks ago
James Jackson-South
0df7ccaa61
Make MemoryAllocator limits configurable and extensible
The allocation limits on MemoryAllocator were internal with no public
way to raise the 1 GB single-buffer default, and ApplyOptions was not
callable from external subclasses, which blocked custom allocators.
- Expose MemoryGroupAllocationLimitBytes, SingleBufferAllocationLimitBytes,
and AccumulativeAllocationLimitBytes with validated protected setters.
- Make ApplyOptions protected so derived allocators can accept options.
- Add MemoryAllocatorOptions.SingleBufferAllocationLimitMegabytes to raise
the contiguous buffer cap up to 2047 MB without a custom allocator.
- Add public-api tests that implement a complete external allocator.
- Add behavior tests for the new option and its validation.
4 weeks ago
James Jackson-South
ff36e83c74
Add AllocationTrackedMemoryManager and refactor allocators ( #3120 )
* Add AllocationTrackedMemoryManager and refactor allocators
* Add AllocationTrackingState and refactor tracking
* Cleanup
* Address feedback
* Introduce ApplyOptions and use in allocators
* Propagate allocation tracking to lifetime guards
* Address Copilot feedback
* Fix multi-buffer group tracking and enforce limits
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Fix override accesibility
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
4 months ago
James Jackson-South
c470a9a05a
Revert "Merge pull request #3056 from SixLabors/js/accumulative-memory-limit"
This reverts commit c5624b534e , reversing
changes made to b3f37932b6 .
4 months ago
antonfirsov
54808ea21a
Undo #2025
7 months ago
James Jackson-South
a8fc4b7048
Add accumulative allocation tracking to allocators
7 months ago
James Jackson-South
55818d39d6
Minor cleanup
8 months ago
James Jackson-South
bca6197517
Make UnmanagedMemoryHandle members readonly and improve pool finalization tests
8 months ago
Stefan Nikolei
5de26525fe
Convert CodeBase to collection Expressions
1 year ago
Stefan Nikolei
18b8b662e9
Use Target Type new only when apparent
1 year ago
Stefan Nikolei
57f5966fe7
use Explicit Types and Target Type new
1 year ago
antonfirsov
7d3f852245
Fix overflow in MemoryAllocator.Create(options) ( #2730 )
Fix an overlook from #2706 . See 92b82779ac (r141770676) .
2 years ago
Anton Firszov
467850f757
Fix overflow in MemoryAllocator.Create(options) ( #2730 )
Fix an overlook from #2706 . See 92b82779ac (r141770676) .
2 years ago
antonfirsov
572366e078
test allocation limits
2 years ago
James Jackson-South
63d4b2028a
Fix args and add tests
2 years ago
antonfirsov
c4150b967c
Disallow allocation attempts of unrepresentable sizes
3 years ago
James Jackson-South
ae3900df7a
Use more accurate bit for alpha lookup. Fix #2469
3 years ago
Stefan Nikolei
4fb8e0d056
Update tests/ImageSharp.Tests/Memory/Allocators/UniformUnmanagedMemoryPoolTests.Trim.cs
4 years ago
Stefan Nikolei
56de9e766b
Disable MemoryAllocator tests
4 years ago
Stefan Nikolei
b661c07744
Remove mac specific skips
4 years ago
James Jackson-South
2b1f6feb0a
Remove .NET version constraints from allocator tests
4 years ago
James Jackson-South
bcf9add4f0
Update UniformUnmanagedMemoryPoolTests.Trim.cs
4 years ago
James Jackson-South
b158e0e2e6
Skip another allocation test on ARM64 .NET7
4 years ago
James Jackson-South
5aa28bc26f
Skip additional allocation failure tests on .NET 7 ARM64
4 years ago
James Jackson-South
88104bd5c8
Skip allocator test on .NET7 ARM64
4 years ago
James Jackson-South
42eb11046e
Update MemoryDiagnosticsTests.cs
4 years ago
James Jackson-South
2964becc21
Increase sleep time for slow VMs
4 years ago
James Jackson-South
0e9a066195
FS Namespaces and Implicit Global Usings
4 years ago
James Jackson-South
6fc84a82f6
Remove other obsolete conditions and warnings
4 years ago
James Jackson-South
97baeaf438
Update all files
4 years ago
Mike Irving
7be52e1325
naming corrections - macOS and .NET
5 years ago
Anton Firszov
de5f661177
make GetTotalAvailableMemoryBytes conditional
5 years ago
James Jackson-South
5b82c57ce7
Add compiler directives
5 years ago
Anton Firszov
854ea5d096
workaround for #2001 / https://github.com/dotnet/runtime/issues/65466
5 years ago
Anton Firszov
6078c0eb92
Revert "attempt to re-enable RentReturnRelease_SubsequentRentReturnsDifferentHandles on Mac"
This reverts commit bbbf687477 .
5 years ago
Anton Firszov
9d155a55aa
finalize and document the API
5 years ago
Anton Firszov
b16fd4c685
implemented TotalUndisposedAllocationCount
5 years ago
Anton Firszov
4736288e04
API skeleton + tests for TotalUndisposedAllocationCount
5 years ago
Anton Firszov
bbbf687477
attempt to re-enable RentReturnRelease_SubsequentRentReturnsDifferentHandles on Mac
5 years ago
Anton Firszov
168c01dd57
move RentReturnRelease_SubsequentRentReturnsDifferentHandles out of process
5 years ago
Brian Popow
bae4feef1b
Change skipping tests on OSX
5 years ago
Brian Popow
d7ff98b19b
Add ActiveIssue attribute to AllocateMemoryGroup_Finalization_ReturnsToPool test
5 years ago
Brian Popow
94735822f5
Add ActiveIssue attribute to AllocateSingleMemoryOwner_Finalization_ReturnsToPool
5 years ago
Anton Firszov
1e24da4bef
improve test naming
5 years ago
Anton Firszov
4986c52b30
Address local failures caused by high memory load
5 years ago
Anton Firszov
01f055a6a2
Revert "attempt to re-enable MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed on Mac"
This reverts commit 7eaa5ee1a2 .
5 years ago
Anton Firszov
c90993b32f
Comments on [Theory] data
5 years ago
Anton Firszov
7eaa5ee1a2
attempt to re-enable MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed on Mac
5 years ago
Anton Firszov
90316a1507
serialize MultiplePoolInstances_TrimPeriodElapsed_AllAreTrimmed
5 years ago