MCPcopy Create free account
hub / github.com/avast/retdec / alignUp

Function alignUp

src/utils/alignment.cpp:56–59  ·  view source on GitHub ↗

* Aligns given value up by specified alignment. Alignment must be power of 2. * * @param value Value to align. * @param alignment Alignment to use. * * @return Value aligned up. If alignment is not power of 2, * return value is undefined. */

Source from the content-addressed store, hash-verified

54 * return value is undefined.
55 */
56std::uint64_t alignUp(std::uint64_t value, std::uint64_t alignment)
57{
58 return alignDown(value + (alignment - 1), alignment);
59}
60
61} // namespace utils
62} // namespace retdec

Callers 10

unpackMethod · 0.85
unpackMethod · 0.85
fixSizeOfSectionsMethod · 0.85
fixImportsMethod · 0.85
parseVersionInfoMethod · 0.85
parseVersionInfoChildMethod · 0.85
parseVarFileInfoChildMethod · 0.85
parseVarStringMethod · 0.85
TEST_FFunction · 0.85

Calls 1

alignDownFunction · 0.85

Tested by 1

TEST_FFunction · 0.68