Page MenuHomePhabricator

Define MAP_NORESERVE to zero for FreeBSD
ClosedPublic

Authored by dim on Feb 7 2015, 1:49 PM.

Details

Summary

The MAP_NORESERVE define has been removed in FreeBSD 11.x, and even
before that, it was never implemented. Just define it to zero instead,
so compiler-rt can compile on FreeBSD 11 and later.

Diff Detail

Event Timeline

dim updated this revision to Diff 19538.Feb 7 2015, 1:49 PM
dim retitled this revision from to Define MAP_NORESERVE to zero for FreeBSD.
dim updated this object.
dim edited the test plan for this revision. (Show Details)
dim added reviewers: kcc, kutuzov.viktor.84.
dim added subscribers: emaste, Unknown Object (MLST).

Looks OK to me.

samsonov accepted this revision.Feb 11 2015, 11:31 AM
samsonov edited edge metadata.

I'm relying on Viktor's judgement here. Feel free to submit.

This revision is now accepted and ready to land.Feb 11 2015, 11:31 AM
This revision was automatically updated to reflect the committed changes.
kcc edited edge metadata.Feb 17 2015, 10:43 AM

How does this all work then?
We need MAP_NORESERVE on Linux to map 20Tb for the asan process.
What's different on FreeBSD?

dim added a comment.Feb 17 2015, 11:13 AM
In D7485#124902, @kcc wrote:

How does this all work then?
We need MAP_NORESERVE on Linux to map 20Tb for the asan process.
What's different on FreeBSD?

The MAP_NORESERVE and MAP_RENAME flags were retired here: https://reviews.freebsd.org/rS273250

Apparently they were never implemented on FreeBSD, at least not with Linux semantics. As far as I understand, FreeBSD doesn't have the functionality of signalling the affected process, instead of blocking for a page.