private static <E extends Exception> ByteBuffer allocate(ThrowableComputable<? extends ByteBuffer, E> computable) throws E {
    if (singleThreadAllocator != null) {
      // Fixes IDEA-222358 Linux native memory leak
      try {
        return singleThreadAllocator.submit(computable::compute).get();
      }
      catch (InterruptedException e) {
        //RC: The buffer is _also_ allocated by a ourAllocator -- should be collected by GC
        //    But it could create some additional pressure on a native memory pool
        Logger.getInstance(DirectByteBufferAllocator.class).error("ByteBuffer allocation in dedicated thread was interrupted", e);
        return computable.compute();
      }
      catch (ExecutionException e) {
        Throwable cause = e.getCause();
        if (cause instanceof OutOfMemoryError) {
          throw (OutOfMemoryError)cause; // OutOfMemoryError should be propagated (handled above)
        }
        else {
          ExceptionUtil.rethrow(e);
          throw new RuntimeException(e);//unreachable, but javac doesn't know :(
        }
      }
    }
    else {
      return computable.compute();
    }
  }
private static <E extends Exception> ByteBuffer allocate(ThrowableComputable<? extends ByteBuffer, E> computable)