- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 89 for Allocate (0.04 sec)
-
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
import java.util.Random; import org.jspecify.annotations.NullUnmarked; /** * Benchmarks for various potential implementations of {@code ByteSource.asCharSource(...).read()}. */ // These benchmarks allocate a lot of data so use a large heap @VmOptions({"-Xms12g", "-Xmx12g", "-d64"}) @NullUnmarked public class ByteSourceAsCharSourceReadBenchmark { enum ReadStrategy { TO_BYTE_ARRAY_NEW_STRING { @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 5.2K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractStreamingHasher.java
checkArgument(bufferSize % chunkSize == 0); // TODO(user): benchmark performance difference with longer buffer // always space for a single primitive this.buffer = ByteBuffer.allocate(bufferSize + 7).order(ByteOrder.LITTLE_ENDIAN); this.bufferSize = bufferSize; this.chunkSize = chunkSize; } /** Processes the available bytes of the buffer (at most {@code chunk} bytes). */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/platform/Platform.kt
when { logger.isLoggable(Level.FINE) -> Throwable(closer) // These are expensive to allocate. else -> null } open fun logCloseableLeak( message: String, stackTrace: Any?, ) { var logMessage = message if (stackTrace == null) { logMessage += " To see where this was allocated, set the OkHttpClient logger level to " +
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 07:33:49 UTC 2025 - 8.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java
// it. To preserve FIFO order and failure atomicity of rejected execution when the same // Runnable is executed more than once, allocate a wrapper that we know is safe to remove by // object identity. // A data structure that returned a removal handle from add() would allow eliminating this // allocation. submittedTask =
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 10.6K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 8.8K bytes - Viewed (0) -
guava/src/com/google/common/io/CharStreams.java
// 2K chars (4K bytes) private static final int DEFAULT_BUF_SIZE = 0x800; /** Creates a new {@code CharBuffer} for buffering reads or writes. */ static CharBuffer createBuffer() { return CharBuffer.allocate(DEFAULT_BUF_SIZE); } private CharStreams() {} /** * Copies all characters between the {@link Readable} and {@link Appendable} objects. Does not * close or flush either object. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 30 17:25:01 UTC 2025 - 10.9K bytes - Viewed (0) -
guava/src/com/google/common/math/PairedStats.java
* * <p><b>Note:</b> No guarantees are made regarding stability of the representation between * versions. */ public byte[] toByteArray() { ByteBuffer buffer = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN); xStats.writeTo(buffer); yStats.writeTo(buffer); buffer.putDouble(sumOfProductsOfDeltas); return buffer.array(); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 12.6K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java
* in no particular order. * * <p>The returned array will be "safe" in that no references to it are maintained by this queue. * (In other words, this method must allocate a new array). The caller is thus free to modify the * returned array. * * <p>This method acts as bridge between array-based and collection-based APIs. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 18.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/ConnectionPoolTest.kt
allocateAndLeakAllocation(poolApi, c1) awaitGarbageCollection() assertThat(pool.closeConnections(100L)).isEqualTo(0L) assertThat(c1.calls).isEmpty() // Can't allocate once a leak has been detected. assertThat(c1.noNewExchanges).isTrue() } @Test fun interruptStopsThread() { val taskRunnerThreads = mutableListOf<Thread>() val taskRunner = TaskRunner(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 12.9K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteStreams.java
throws IOException { // Roughly size to match what has been read already. Some file systems, such as procfs, return 0 // as their length. These files are very small, so it's wasteful to allocate an 8KB buffer. int initialBufferSize = min(BUFFER_SIZE, max(128, Integer.highestOneBit(totalLen) * 2)); // Starting with an 8k buffer, double the size of each successive buffer. Smaller buffers
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 31.1K bytes - Viewed (0)