mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 01:55:27 +00:00
19 lines
428 B
C#
19 lines
428 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;
|
||
|
}
|
||
|
}
|
||
|
}
|