Fix size calculation

apply division to int/long type result a round down value(1 == 3/2).
in this case,resize/increase will be defeated.