private void updatePeakMemoryReservations ( ) { long userMemory = operatorMemoryContext . getUserMemory ( ) ; long systemMemory = operatorMemoryContext . getSystemMemory ( ) ; long totalMemory = userMemory + systemMemory ; peakUserMemoryReservation . accumulateAndGet ( userMemory , Math :: max ) ; peakSystemMemoryReservation . accumulateAndGet ( systemMemory , Math :: max ) ; peakTotalMemoryReservation . accumulateAndGet ( totalMemory , Math :: max ) ; }
listen to all memory allocations and update the peak memory reservations accordingly