| 505 | } |
| 506 | |
| 507 | long SysAlloc(regs64_t* r){ |
| 508 | uint64_t pageCount = SC_ARG0(r); |
| 509 | uintptr_t* addressPointer = (uintptr_t*)SC_ARG1(r); |
| 510 | |
| 511 | uintptr_t address = (uintptr_t)Memory::Allocate4KPages(pageCount, Scheduler::GetCurrentProcess()->addressSpace); |
| 512 | |
| 513 | assert(address); |
| 514 | |
| 515 | for(unsigned i = 0; i < pageCount; i++){ |
| 516 | Memory::MapVirtualMemory4K(Memory::AllocatePhysicalMemoryBlock(),address + i * PAGE_SIZE_4K,1,Scheduler::GetCurrentProcess()->addressSpace); |
| 517 | memset((void*)(address + i * PAGE_SIZE_4K), 0, PAGE_SIZE_4K); |
| 518 | } |
| 519 | |
| 520 | *addressPointer = address; |
| 521 | |
| 522 | return 0; |
| 523 | } |
| 524 | |
| 525 | long SysChmod(regs64_t* r){ |
| 526 | return 0; |
nothing calls this directly
no test coverage detected