shift sizeof functions out of generator