Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for OutOfMemoryError (0.33 sec)

  1. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

      /**
       * Returns the response as a byte array.
       *
       * This method loads entire response body into memory. If the response body is very large this
       * may trigger an [OutOfMemoryError]. Prefer to stream the response body if this is a
       * possibility for your response.
       */
      @Throws(IOException::class)
      fun bytes() = commonBytes()
    
      /**
       * Returns the response as a [ByteString].
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

          }
        }
      }
    
      private static String oldRepeat(String string, int count) {
        // If this multiplication overflows, a NegativeArraySizeException or
        // OutOfMemoryError is not far behind
        final int len = string.length();
        final int size = len * count;
        char[] array = new char[size];
        for (int i = 0; i < size; i += len) {
          string.getChars(0, len, array, i);
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

          }
        }
      }
    
      private static String oldRepeat(String string, int count) {
        // If this multiplication overflows, a NegativeArraySizeException or
        // OutOfMemoryError is not far behind
        final int len = string.length();
        final int size = len * count;
        char[] array = new char[size];
        for (int i = 0; i < size; i += len) {
          string.getChars(0, len, array, i);
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java

            /* ignore */
          }
          try {
            // Fill up heap so soft references get cleared.
            filler = new byte[Math.max(filler.length, filler.length * 2)];
          } catch (OutOfMemoryError e) {
          }
        }
    
        CacheTesting.processPendingNotifications(cache);
        assertEquals(1, cache.size());
        assertEquals(1, removalListener.getCount());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

          // Bug in inputFuture.get(). Propagate to the output Future so that its consumers don't hang.
          setException(e);
          return;
        } catch (Error e) {
          /*
           * StackOverflowError, OutOfMemoryError (e.g., from allocating ExecutionException), or
           * something. Try to treat it like a RuntimeException. If we overflow the stack again, the
           * resulting Error will propagate upward up to the root call to set().
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/ByteStreams.java

        // read MAX_ARRAY_LEN bytes without seeing end of stream
        if (in.read() == -1) {
          // oh, there's the end of the stream
          return combineBuffers(bufs, MAX_ARRAY_LEN);
        } else {
          throw new OutOfMemoryError("input is too large to fit in a byte array");
        }
      }
    
      private static byte[] combineBuffers(Queue<byte[]> bufs, int totalLen) {
        if (bufs.isEmpty()) {
          return new byte[0];
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/escape/CharEscaper.java

       * ok if it's in a method call. If the index passed in is 0 then no copying will be done.
       */
      private static char[] growBuffer(char[] dest, int index, int size) {
        if (size < 0) { // overflow - should be OutOfMemoryError but GWT/j2cl don't support it
          throw new AssertionError("Cannot increase internal buffer any further");
        }
        char[] copy = new char[size];
        if (index > 0) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 6.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/BloomFilterTest.java

            @Override
            protected Random initialValue() {
              return new Random();
            }
          };
    
      private static final int GOLDEN_PRESENT_KEY = random.get().nextInt();
    
      @AndroidIncompatible // OutOfMemoryError
      public void testLargeBloomFilterDoesntOverflow() {
        long numBits = Integer.MAX_VALUE;
        numBits++;
    
        LockFreeBitArray bitArray = new LockFreeBitArray(numBits);
        assertTrue(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/BloomFilterTest.java

            @Override
            protected Random initialValue() {
              return new Random();
            }
          };
    
      private static final int GOLDEN_PRESENT_KEY = random.get().nextInt();
    
      @AndroidIncompatible // OutOfMemoryError
      public void testLargeBloomFilterDoesntOverflow() {
        long numBits = Integer.MAX_VALUE;
        numBits++;
    
        LockFreeBitArray bitArray = new LockFreeBitArray(numBits);
        assertTrue(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/cache/CacheReferencesTest.java

            /* ignore */
          }
          try {
            // Fill up heap so soft references get cleared.
            filler = new byte[Math.max(filler.length, filler.length * 2)];
          } catch (OutOfMemoryError e) {
          }
        }
    
        CacheTesting.processPendingNotifications(cache);
        assertEquals(1, cache.size());
        assertEquals(1, removalListener.getCount());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.1K bytes
    - Viewed (0)
Back to top