code: public void releaseExecutionMemory(long size, MemoryConsumer consumer) {
      logger.debug("Task {} release {} from {}", taskAttemptId, Utils.bytesToString(size), consumer);
      memoryManager.releaseExecutionMemory(size, taskAttemptId, consumer.getMode());
    }
docs: Release N bytes of execution memory for a MemoryConsumer.