-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Open
Description
Proposal Details
Proposal
This proposal is to add support of the madvise(2) syscall to the golang.org/x/exp/mmap package. Specifying madvise can help to guide the kernel on how to handle the mmap'd file.
To support madvise, it is necessary to:
- Expose the call through the
syscallpackage - Expose configurations in the
golang.org/x/exp/mmappackage will be specified atmmap.Open
In addition to the above, it would be great to be able to specify a flag different from syscall.MAP_SHARED for the mmap'd file. See current implementation.
These new configurations can then be chosen using an option struct to pass to the mmap.Open call.