Bug 115371 - `mmap` does not search for nearby addresses if the requested address is taken
Summary: `mmap` does not search for nearby addresses if the requested address is taken
Status: NEW
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-28 01:47 UTC by demetriobenour
Modified: 2020-02-13 17:25 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.5
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description demetriobenour 2016-03-28 01:47:58 UTC
According to https://github.com/LuaJIT/LuaJIT/issues/49, if the address passed to mmap(2) is already in use, it is ignored.  This breaks SpiderMonkey and LuaJIT, forcing an ugly workaround (essentially: do the search in userspace), which is racy and slow.

It would be nice to implement the search for a nearby usable address in the kernel.

Note You need to log in before you can comment on or make changes to this bug.