MCPcopy Create free account
hub / github.com/ElementsProject/elements / align_up

Function align_up

src/support/lockedpool.cpp:39–42  ·  view source on GitHub ↗

/ Utilities Align up to power of 2 */

Source from the content-addressed store, hash-verified

37//
38/** Align up to power of 2 */
39static inline size_t align_up(size_t x, size_t align)
40{
41 return (x + align - 1) & ~(align - 1);
42}
43
44/*******************************************************************************/
45// Implementation: Arena

Callers 3

allocMethod · 0.85
AllocateLockedMethod · 0.85
FreeLockedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected