• Vlad Tsyrklevich's avatar
    GWP-ASan: Allow specifying allocation alignment · 380a7a60
    Vlad Tsyrklevich authored
    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: default avatarVitaly Buka <vitalybuka@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#605063}
    380a7a60
guarded_page_allocator.h 7.36 KB