| 900 | } |
| 901 | |
| 902 | U8* KMemory::getRamPtr(U32 address, U32 len, bool write, bool futex) { |
| 903 | U32 index = address >> K_PAGE_SHIFT; |
| 904 | U32 offset = address & K_PAGE_MASK; |
| 905 | |
| 906 | if (len + offset > K_PAGE_SIZE) { |
| 907 | kpanic("KMemory::getRamPtr"); |
| 908 | } |
| 909 | U8* result = data->mmu[index].getPage()->getRamPtr(&data->mmu[index], index, write, true, offset, len); |
| 910 | if (result && futex) { |
| 911 | data->mmu[index].flags |= PAGE_FUTEX; |
| 912 | } |
| 913 | return result; |
| 914 | } |
| 915 | |
| 916 | void KMemory::clone(KMemory* from, bool vfork) { |
| 917 | // don't allow changes to the from pages while we are cloning |
no test coverage detected