fn alignPointerOffset(ptr: anytype, align_to: usize) ?usize

Returns the number of elements that, if added to the given pointer, align it to a multiple of the given quantity, or null if one of the following conditions is met:

  • The aligned pointer would not fit the address space,
  • The delta required to align the pointer is not a multiple of the pointee’s type.

Parameters

ptr: anytype,
align_to: usize,