misc: chore: Fix object creation in Cpu project

This commit is contained in:
Evan Husted 2025-01-26 15:15:48 -06:00
parent beab133c8d
commit 94b65aec02
5 changed files with 12 additions and 12 deletions

View file

@ -49,7 +49,7 @@ namespace ARMeilleure.Common
public TableSparseBlock(ulong size, Action<IntPtr> ensureMapped, PageInitDelegate pageInit)
{
SparseMemoryBlock block = new SparseMemoryBlock(size, pageInit, null);
SparseMemoryBlock block = new(size, pageInit, null);
_trackingEvent = (ulong address, ulong size, bool write) =>
{
@ -363,7 +363,7 @@ namespace ARMeilleure.Common
/// <returns>The new sparse block that was added</returns>
private TableSparseBlock ReserveNewSparseBlock()
{
TableSparseBlock block = new TableSparseBlock(_sparseBlockSize, EnsureMapped, InitLeafPage);
TableSparseBlock block = new(_sparseBlockSize, EnsureMapped, InitLeafPage);
_sparseReserved.Add(block);
_sparseReservedOffset = 0;
@ -416,7 +416,7 @@ namespace ARMeilleure.Common
IntPtr address = (IntPtr)NativeAllocator.Instance.Allocate((uint)size);
page = new AddressTablePage(false, address);
Span<T> span = new Span<T>((void*)page.Address, length);
Span<T> span = new((void*)page.Address, length);
span.Fill(fill);
}