make sure you apply this same logic (eg: discounting the number of bytes allocated to 0) in the free code too, otherwise the bytes counter will skew