4 ms·
padded_size := ceil(size / 2048) * 2048 ... may be wrong if size is large that can't be store in mantissa of double/float. Assuming C (or equivalent), I usual
by innocenat 12y ago
padded_size := ceil(size / 2048) * 2048
... may be wrong if size is large that can't be store in mantissa of double/float.
Assuming C (or equivalent), I usually do this:
padded_size = ((size + 2047) / 2048) * 2048;