code: public boolean hasEnoughMemory(ClusterNode node) {
      int total = node.getTotal().memoryMB;
      int free = node.getFree().memoryMB;
      if (free < nodeReservedMemoryMB) {
        if (LOG.isDebugEnabled()) {
          LOG.debug(node.getHost() + " not enough memory." +
            " totalMB:" + total +
            " free:" + free +
            " limit:" + nodeReservedMemoryMB);
        }
        return false;
      }
      return true;
    }
docs: Check if the node has enough memory to run tasks
  @param node node to check
  @return true if the node has enough memory, false otherwise