base: Add IsAligned helpers to aligned_memory
Add IsAligned and IsPageAligned helpers to the aligned_memory file. We need these helpers for another CL we're working on and this seems like the best place for then. - Add integral and pointer methods for IsAligned, which prefer compiler builtins if available. - Add an IsPageAligned which accepts integral or pointer types. - Improve GetPageSize() on POSIX where it should use sysconf(_SC_PAGESIZE) if it's available and cache the value. Bug:1067833 Change-Id: Ic7198873042c1ca8896b56449774dbf585d3a944 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2136466 Commit-Queue: Brian Geffon <bgeffon@chromium.org> Reviewed-by:François Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/master@{#756778}
Showing
Please register or sign in to comment