vm: fix mapping of file's last page

thanks @red_prig for investigation
This commit is contained in:
DH 2024-08-31 21:17:02 +03:00
parent ea2915467a
commit e6022c1c4c
6 changed files with 136 additions and 69 deletions

View file

@ -14,10 +14,6 @@ orbis::SysResult orbis::sys_sstk(Thread *, sint) {
orbis::SysResult orbis::sys_mmap(Thread *thread, caddr_t addr, size_t len,
sint prot, sint flags, sint fd, off_t pos) {
if (auto impl = thread->tproc->ops->mmap) {
// hack for audio control shared memory
if (len == 3880) {
return impl(thread, addr, 0x10000, prot, flags, fd, pos);
}
return impl(thread, addr, len, prot, flags, fd, pos);
}