0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 22:05:46 +00:00
Ryujinx/Ryujinx.HLE/HOS/Kernel/Memory/KMemoryBlockAllocator.cs
gdkchan 0039bb6394
Refactor SVC handler (#540)
* Refactor SVC handler

* Get rid of KernelErr

* Split kernel code files into multiple folders
2018-12-18 03:33:36 -02:00

19 lines
No EOL
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;
}
}
}