docs: @Override
      public PointersPair malloc(AllocationShape shape, AllocationPoint point, AllocationStatus location) {
          val reqMemory = AllocationUtils.getRequiredMemory(shape);
          if (location == AllocationStatus.DEVICE && reqMemory < CudaEnvironment.getInstance().getConfiguration().getMaximumDeviceAllocation()) {
  
  
              val deviceId = AtomicAllocator.getInstance().getDeviceId();
              ensureDeviceCacheHolder(deviceId, shape);
  
              val cache = deviceCache.get(deviceId).get(shape);
              if (cache != null) {
                  val pointer = cache.poll();
                  if (pointer != null) {
                      cacheDeviceHit.incrementAndGet();
  
                      deviceCachedAmount.get(deviceId).addAndGet(-reqMemory);
  
                      val pair = new PointersPair();
                      pair.setDevicePointer(pointer);
  
                      point.setAllocationStatus(AllocationStatus.DEVICE);
                      point.setDeviceId(deviceId);
  
  
                      MemoryTracker.getInstance().incrementAllocatedAmount(deviceId, reqMemory);
                      MemoryTracker.getInstance().decrementCachedAmount(deviceId, reqMemory);
  
                      return pair;
                  }
              }
              cacheDeviceMiss.incrementAndGet();
              return super.malloc(shape, point, location);
          }
          return super.malloc(shape, point, location);
      }