Avoid server allocating more memory than limit