KMemoryBlockAllocator.cs 428 B

12345678910111213141516171819
  1. namespace Ryujinx.HLE.HOS.Kernel
  2. {
  3. class KMemoryBlockAllocator
  4. {
  5. private ulong CapacityElements;
  6. public int Count { get; set; }
  7. public KMemoryBlockAllocator(ulong CapacityElements)
  8. {
  9. this.CapacityElements = CapacityElements;
  10. }
  11. public bool CanAllocate(int Count)
  12. {
  13. return (ulong)(this.Count + Count) <= CapacityElements;
  14. }
  15. }
  16. }