use provided limit for allocating result space