Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for deallocate (0.08 sec)

  1. guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        CharBuffer buf2 = CharBuffer.allocate(expected.length());
        assertEquals(expected.length() == 0 ? -1 : expected.length(), reader.read(buf2));
        Java8Compatibility.flip(buf2);
        assertEquals(expected, buf2.toString());
        assertFullyRead(reader);
    
        // read in chunks to fixed CharBuffer
        reader = new CharSequenceReader(charSequence);
        buf2 = CharBuffer.allocate(5);
        builder = new StringBuilder();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. src/main/java/jcifs/internal/smb2/rdma/RdmaBufferManager.java

            this.totalAllocated = new AtomicLong();
            this.totalReleased = new AtomicLong();
    
            // Pre-allocate buffer pool
            initializeBufferPool();
        }
    
        /**
         * Initialize the buffer pool with pre-allocated regions
         */
        private void initializeBufferPool() {
            // Allocate send buffers
            for (int i = 0; i < initialSendBuffers; i++) {
                try {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java

      }
    
      @Override
      public HashCode hashInt(int input) {
        return hashBytes(ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(input).array());
      }
    
      @Override
      public HashCode hashLong(long input) {
        return hashBytes(ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(input).array());
      }
    
      @Override
      public HashCode hashUnencodedChars(CharSequence input) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. guava/src/com/google/common/hash/AbstractByteHasher.java

            update(b.get());
          }
        }
      }
    
      /** Updates the sink with the given number of bytes from the buffer. */
      @SuppressWarnings("ByteBufferBackingArray") // We created the array with ByteBuffer.allocate().
      @CanIgnoreReturnValue
      private Hasher update(ByteBuffer scratch, int bytes) {
        try {
          update(scratch.array(), 0, bytes);
        } finally {
          Java8Compatibility.clear(scratch);
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 12:40:17 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/SmbComNegotiateResponseTest.java

            response = new SmbComNegotiateResponse(serverData);
        }
    
        @Test
        void testReadParameterWordsWireFormat() {
            // Prepare a byte array with sample parameter words
            ByteBuffer buffer = ByteBuffer.allocate(34);
            buffer.order(ByteOrder.LITTLE_ENDIAN);
            buffer.putShort((short) 0); // dialectIndex
            buffer.put((byte) 0x0F); // securityMode (user, encrypted, sigs enabled, sigs required)
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/rdma/tcp/TcpRdmaConnection.java

            }
    
            try {
                socket.setSoTimeout(timeout);
    
                // First, read the header to determine message size
                ByteBuffer headerBuffer = ByteBuffer.allocate(4);
                while (headerBuffer.hasRemaining()) {
                    int read = socketChannel.read(headerBuffer);
                    if (read < 0) {
                        throw new IOException("Connection closed by peer");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/BufferCacheSecurityTest.java

         * Test that buffer cache handles allocation when cache is full.
         */
        @Test
        public void testBufferAllocationWhenCacheFull() {
            // Given - Allocate many buffers to potentially fill the cache
            List<byte[]> buffers = new ArrayList<>();
    
            // Allocate more buffers than cache can hold
            for (int i = 0; i < 20; i++) {
                byte[] buffer = BufferCache.getBuffer();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb2/rdma/RdmaBufferManagerTest.java

        }
    
        @Test
        public void testStatistics() throws Exception {
            long initialAllocated = bufferManager.getTotalAllocated();
    
            // Allocate regions larger than pool buffer size to force new allocations
            RdmaMemoryRegion region1 = bufferManager.getSendRegion(131072); // 128KB > 64KB pool size
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

     *
     * <p>{@link CharStreams#copy} has type specific optimizations for various common Appendable and
     * Reader implementations, this compares the performance of the different options.
     */
    // These benchmarks allocate a lot of data so use a large heap
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    @NullUnmarked
    public class CharStreamsCopyBenchmark {
      enum CopyStrategy {
        OLD {
          @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb1/smb1/NtTransQuerySecurityDescTest.java

         * {@link NtTransQuerySecurityDesc#writeParametersWireFormat(byte[], int)}.
         */
        private static byte[] expectedParameters(int fid, int securityInformation) {
            ByteBuffer bb = ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN);
            bb.putShort((short) fid);
            bb.put((byte) 0x00); // Reserved
            bb.put((byte) 0x00); // Reserved
            bb.putInt(securityInformation);
            return bb.array();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.6K bytes
    - Viewed (0)
Back to top