This repository has been archived on 2026-01-05. You can view files and clone it, but cannot push or open issues/pull-requests.
ryubing/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryBlockAllocator.cs

19 lines
428 B
C#

namespace Ryujinx.HLE.HOS.Kernel.Memory
{
class KMemoryBlockAllocator
{
private ulong _capacityElements;
public int Count { get; set; }
public KMemoryBlockAllocator(ulong capacityElements)
{
_capacityElements = capacityElements;
}
public bool CanAllocate(int count)
{
return (ulong)(Count + count) <= _capacityElements;
}
}
}