Set buffer size to smallest power of 2 which is greater than or equals to
specified capacity.