Module utils

Source

Functions§

block_size_for_payload
Get the necessary |block size| to fit the given |payload_size| in range MIN_ORDER_SIZE <= block size <= MAX_ORDER_SIZE
fit_order
Returns the smallest order such that (MIN_ORDER_SHIFT << order) >= size. Size must be non zero.
order_to_size
Get size in bytes of a given |order|.
payload_size_for_order
Get the size in bytes for the payload section of a block of the given |order|.