New comment by pullmoll on void-packages repository https://github.com/void-linux/void-packages/issues/11426#issuecomment-489457846 Comment: Hmm.. this code seems wrong for me `linux-user/mmap.c:726…`: ``` 726 int prot = 0; 727 if (reserved_va && old_size < new_size) { 728 abi_ulong addr; 729 for (addr = old_addr + old_size; 730 addr < old_addr + new_size; 731 addr++) { 732 prot |= page_get_flags(addr); 733 } 734 } ``` The loop with `addr` is for every byte of the range and not for every page using `addr += TARGET_PAGE_SIZE` like it is done in other places in the same source. If you `mremap()` and increase size by several MiB that will create millions of calls to `page_get_flags(addr)`. Or is this really intended here?