docs: public long getApproximateFreeMemory(int deviceId) {
          val externalAllocations = getTotalMemory(deviceId) - getFreeMemory(deviceId);
          val active = getActiveMemory(deviceId);
          val free = getTotalMemory(deviceId) - (active + externalAllocations);
          return free;
      }