Opened 3 years ago
Closed 20 months ago
#17224 closed bug (fixed)
MMAP: process address mapping uses all avail memory due to no ENOMEM result
Reported by: | cocobean | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta5 |
Component: | System/POSIX | Version: | R1/beta3 |
Keywords: | mmap, posix | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Open POSIX Test Suite fails MMAP 24-1 test. Does not provided ENOMEM result when available or free memory resource(s) is near exhaustion (i.e. insufficient room in the address space for continued memory mapping).
The test will hold used memory resources even if the thread is killed. Tested on Haiku R1B3 x86_64 (+56).
The mmap() function shall fail if: [ENOMEM] MAP_FIXED was specified, and the range [addr,addr+len) exceeds that allowed for the address space of a process; or, if MAP_FIXED was not specified and there is insufficient room in the address space to effect the mapping. Test Steps: 1. In a very long loop, keep mapping a shared memory object, until there this insufficient room in the address space; 2. Should get ENOMEM.
Ref: https://github.com/haiku/open_posix_testsuite/blob/master/conformance/interfaces/mmap/24-1.c
Change History (4)
comment:2 by , 21 months ago
comment:3 by , 21 months ago
Doesn't this test take an extremely long time to run? I think I looked into this and there is a major performance optimization we could make in the kernel.
comment:4 by , 20 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Performance fix merged in hrev56858.
Tested on hrev56804 x86 - PASSED
Please close this ticket.