apply cleanup patch from nox for stack/ps calls
yet another patch from nox to move allocations down to low memory