It doesn’t really work though for generic vectors. If you support not just vec_push but vec_pop as well, then you really do need to store capacity separately or else call realloc way more often than you normally need to.
The capacity as bit_ceil(len) ensures that at most, half of the allocated space is wasted - excess space is O(n).