code: @Override
      public void monitor() {
          Runtime runtime = Runtime.getRuntime();
  
          double allocatedMemory = runtime.totalMemory() / (double) 1024;
          double freeMemory = runtime.freeMemory() / (double) 1024;
  
          double totalFreeMemory = freeMemory + (maxMemory - allocatedMemory);
  
          calculatedAllocatedMemory = allocatedMemory;
          calculatedFreeMemory = freeMemory;
          calculatedTotalFreeMemory = totalFreeMemory;
  
          this.percentageOfMemoryUsed = (((double) 100) - ((totalFreeMemory / maxMemory) * ((double) 100)));
  
          super.applyNewValue(memoryAlarmLevel, percentageOfMemoryUsed, memoryThreshold, backToNormalMemoryThreshold, true);
      }
docs: /*
  (non-Javadoc)
  
  @see org.restcomm.ss7.congestion.CongestionMonitor#monitor()