Don't be in hugepage more, when allocation failed.
Fixed calculation of allocation size.