code: private void enforceMemoryLimits()
      {
          List<QueryExecution> runningQueries = queryTracker.getAllQueries().stream()
                  .filter(query -> query.getState() == RUNNING)
                  .collect(toImmutableList());
          memoryManager.process(runningQueries, this::getQueries);
      }
docs: Enforce memory limits at the query level