mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 18:15:25 +00:00
0039bb6394
* Refactor SVC handler * Get rid of KernelErr * Split kernel code files into multiple folders
19 lines
428 B
C#
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;
|
|
}
|
|
}
|
|
} |