public virtual Resource GetHeadroom()
        {
            Resource queueCurrentLimit;
            Resource clusterResource;

            lock (queueResourceLimitsInfo)
            {
                queueCurrentLimit = queueResourceLimitsInfo.GetQueueCurrentLimit();
                clusterResource   = queueResourceLimitsInfo.GetClusterResource();
            }
            Resource headroom = queue.GetHeadroom(user, queueCurrentLimit, clusterResource, application
                                                  , required);

            // Corner case to deal with applications being slightly over-limit
            if (headroom.GetMemory() < 0)
            {
                headroom.SetMemory(0);
            }
            return(headroom);
        }