CARB_ALIGNED_SIZE

Defined in carb/Defines.h

CARB_ALIGNED_SIZE(size, alignment)

Aligns a size to the given alignment.

Note

The alignment need not be a power-of-two.

Parameters
  • size – The size to align.

  • alignment – The alignment value in bytes.

Returns

If size is already aligned to alignment, returns size; otherwise returns size rounded up to the next multiple of alignment.