presto-main/src/main/java/io/prestosql/memory/QueryContext.java/QueryContext/enforceUserMemoryLimit
class QueryContext:    @GuardedBy("this")
    private void enforceUserMemoryLimit(long allocated, long delta, long maxMemory)
    {
        if (allocated + delta > maxMemory) {
            throw exceededLocalUserMemoryLimit(succinctBytes(maxMemory), getAdditionalFailureInfo(allocated, delta));
        }
    }