Skip to content

proposal: x/exp/mmap: support madvise syscall #73342

@samueleresca

Description

@samueleresca

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 syscall package
  • Expose configurations in the golang.org/x/exp/mmap package will be specified at mmap.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions