mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-23 02:40:33 +00:00
19 lines
No EOL
431 B
C#
19 lines
No EOL
431 B
C#
namespace Ryujinx.HLE.HOS.Kernel
|
|
{
|
|
class KMemoryBlockAllocator
|
|
{
|
|
private ulong _capacityElements;
|
|
|
|
public int Count { get; set; }
|
|
|
|
public KMemoryBlockAllocator(ulong capacityElements)
|
|
{
|
|
this._capacityElements = capacityElements;
|
|
}
|
|
|
|
public bool CanAllocate(int count)
|
|
{
|
|
return (ulong)(this.Count + count) <= _capacityElements;
|
|
}
|
|
}
|
|
} |