Cursed thing that fixes JIT Cache exhaustion

This commit is contained in:
VocalFan
2025-02-03 02:05:40 -05:00
parent 2d7700949c
commit 2e2d26d49d
3 changed files with 79 additions and 34 deletions

View File

@@ -7,6 +7,7 @@ namespace ARMeilleure.Memory
public const int DefaultGranularity = 65536; // Mapping granularity in Windows.
public IJitMemoryBlock Block { get; }
public IJitMemoryAllocator Allocator { get; }
public nint Pointer => Block.Pointer;
@@ -21,6 +22,7 @@ namespace ARMeilleure.Memory
granularity = DefaultGranularity;
}
Allocator = allocator;
Block = allocator.Reserve(maxSize);
_maxSize = maxSize;
_sizeGranularity = granularity;