(allocate_stack): Return EAGAIN instead of ENOMEM when out of memory.