I don't know if I can call 'new_allocated = ((size_t)newsize + (newsize >> 3) + 6) & ~(size_t)3;' very readable...
It's literally current size + (current size/8) + fiddle
( the fiddle is there to prevent a fail to increase for small input (exercise for reader?) )
followed by a mask to ensure a multiple of 8.
The rational would be no floating point ops and all the weirdness that can entail plus the speed of raw shift | addition | mask.
You're correct that it deserves a twice over as the fiddle raises an eyebrow that invites investigation across inputs.