Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MAP_ALIGNED flag to mmap on NetBSD #8385

Open
daurnimator opened this issue Mar 29, 2021 · 0 comments
Open

Use MAP_ALIGNED flag to mmap on NetBSD #8385

daurnimator opened this issue Mar 29, 2021 · 0 comments
Labels
os-netbsd standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@daurnimator
Copy link
Contributor

MAP_ALIGNED(n):
Request that the allocation be aligned to the given boundary. The parameter n should be the base 2 logarithm of the desired alignment (e.g., to request alignment to 16K, use 14 as the value for n). The alignment must be equal to or greater than the platform's page size as returned by sysconf(3) with the _SC_PAGESIZE request. The following constants are defined for convenience:

  • MAP_ALIGNMENT_16MB
  • MAP_ALIGNMENT_4GB
  • MAP_ALIGNMENT_1TB
  • MAP_ALIGNMENT_256TB
  • MAP_ALIGNMENT_64PB

We should use this from the page allocator.

@daurnimator daurnimator added standard library This issue involves writing Zig code for the standard library. os-netbsd labels Mar 29, 2021
@Vexu Vexu added this to the 0.9.0 milestone Mar 29, 2021
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os-netbsd standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

No branches or pull requests

3 participants