Function gkfs::utils::arithmetic::block_overrun

Function Documentation

constexpr size_t gkfs::utils::arithmetic::block_overrun(const uint64_t offset, const size_t block_size)

Return the overrun bytes that separate @offset from the closest left side block boundary.

Note

This function assumes that block_size is a power of 2.

Parameters
  • offset[in] the offset for which the overrun distance should be computed.

  • block_size[in] the block size used to compute boundaries.

Returns

the distance in bytes between the left-side boundary of @offset