Ryujinx/Ryujinx.HLE/HOS/Kernel/KMemoryBlockAllocator.cs
2018-12-01 14:24:37 -06:00

19 lines
No EOL
421 B
C#

namespace Ryujinx.HLE.HOS.Kernel
{
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;
}
}
}