check the allocation size is never zero

Reaching this should require counter wrap, or a bug in code that
currently is correct.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>