genalloc: fix allocation from end of pool