presto-main/src/main/java/io/prestosql/memory/TotalReservationLowMemoryKiller.java/TotalReservationLowMemoryKiller/chooseQueryToKill
class TotalReservationLowMemoryKiller:    @Override
    public Optional<QueryId> chooseQueryToKill(List<QueryMemoryInfo> runningQueries, List<MemoryInfo> nodes)
    {
        QueryId biggestQuery = null;
        long maxMemory = 0;
        for (QueryMemoryInfo query : runningQueries) {
            long bytesUsed = query.getMemoryReservation();
            if (bytesUsed > maxMemory && GENERAL_POOL.equals(query.getMemoryPoolId())) {
                biggestQuery = query.getQueryId();
                maxMemory = bytesUsed;
            }
        }
        return Optional.ofNullable(biggestQuery);
    }