Memory Barrier

jd1008 jd1008 at gmail.com
Fri Nov 25 17:43:55 UTC 2016


I "used" to use the madvise(2) syscall.
I am not sure if it still works or even available.

On 11/25/2016 08:25 AM, David Naylor wrote:
> Hi
>
> Is there anyway to implement a memory barrier in FreeBSD without using
> mprotect(2) [1].  Unfortunately, the mprotect(2) method uses mlock(2) and
> mlock(2) does not always work, depending on load and permissions.
>
> I see there was a proposal on a Linux mailing list for a new syscall to
> implement this functionality [2] but FreeBSD 11.0 does not appear to have it.
>
> Regards
>
> [1]
> https://github.com/dotnet/coreclr/blob/master/src/pal/src/thread/process.cpp#L2886
> https://github.com/dotnet/coreclr/blob/master/src/pal/src/thread/process.cpp#L2929
> [2] https://lkml.org/lkml/2015/7/10/766



More information about the freebsd-questions mailing list