GWP-ASan: Allow specifying allocation alignment
Allow specifying an allocation alignment to Allocate() that works similarly to the alignment parameter to aligned_alloc(), e.g. the alignment parameter must be a power-of-two smaller than size. Unlike aligned_alloc it doesn't verify that the size is a multiple of alignment since that's not enforced by some functions like posix_memalign. Default alignment behavior stays the same if no alignment is specified. Bug: 896019 Change-Id: I542314aa2405265af03cd6519f5c997ed1e95152 Reviewed-on: https://chromium-review.googlesource.com/c/1310563 Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org> Reviewed-by:Vitaly Buka <vitalybuka@chromium.org> Cr-Commit-Position: refs/heads/master@{#605063}
Showing
Please register or sign in to comment