Hardware-supported data types have alignment restrictions that are far below the target's page size, and the few people who actually need something beyond page-level alignment (e.g. pointer masking tricks, DMA engine restrictions, huge pages) are better off handling the page mapping themselves anyways.
The benefit of this constraint is that memory allocations via the Allocator interface can be served with at most one system call, the consequences of which are:
- Simplifies implementation
- Gets rid of potential race conditions
- Gives us an OS-enforced upper bound on running time
- Opens up the possibility to implement an async-signal-safe allocator, for use in signal handlers
Hardware-supported data types have alignment restrictions that are far below the target's page size, and the few people who actually need something beyond page-level alignment (e.g. pointer masking tricks, DMA engine restrictions, huge pages) are better off handling the page mapping themselves anyways.
The benefit of this constraint is that memory allocations via the Allocator interface can be served with at most one system call, the consequences of which are: