code: @Override
      public void free(AllocationPoint point) {
          if (point.getAllocationStatus() == AllocationStatus.DEVICE) {
              if (point.isConstant())
                  return;
  
              val shape = point.getShape();
              val deviceId = point.getDeviceId();
              val address = point.getDevicePointer().address();
              val reqMemory = AllocationUtils.getRequiredMemory(shape);
              // we don't cache too big objects
  
              if (reqMemory > CudaEnvironment.getInstance().getConfiguration().getMaximumDeviceCacheableLength() || deviceCachedAmount.get(deviceId).get() >= CudaEnvironment.getInstance().getConfiguration().getMaximumDeviceCache()) {
                  super.free(point);
                  return;
              }
  
              ensureDeviceCacheHolder(deviceId, shape);
  
              val cache = deviceCache.get(deviceId).get(shape);
  
              if (point.getDeviceId() != deviceId)
                  throw new RuntimeException("deviceId changed!");
  
              // memory chunks < threshold will be cached no matter what
              if (reqMemory <= FORCED_CACHE_THRESHOLD) {
                  cache.put(new CudaPointer(point.getDevicePointer().address()));
                  MemoryTracker.getInstance().incrementCachedAmount(deviceId, reqMemory);
                  MemoryTracker.getInstance().decrementAllocatedAmount(deviceId, reqMemory);
                  return;
              } else {
  
                  cache.put(new CudaPointer(point.getDevicePointer().address()));
  
                  MemoryTracker.getInstance().incrementCachedAmount(deviceId, reqMemory);
                  MemoryTracker.getInstance().decrementAllocatedAmount(deviceId, reqMemory);
                  return;
              }
          }
          super.free(point);
      }
docs: This method frees specific chunk of memory, described by AllocationPoint passed in
  
  PLEASE NOTE: This method can actually ignore free, and keep released memory chunk for future reuse.
  
  @param point