Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for leaky (0.17 sec)

  1. src/test/java/jcifs/util/ResourceManagerTest.java

            // Check for leaks
            resourceManager.checkForLeaks();
    
            Map<String, Object> stats = resourceManager.getStatistics();
            // The leak counter may or may not increment depending on GC timing
            assertNotNull(stats.get("totalLeaks"));
        }
    
        private void createLeakyResource() {
            TestResource resource = new TestResource("leaky");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  2. cmd/leak-detect_test.go

    	"sort"
    	"strings"
    	"time"
    )
    
    const (
    	// deadline (in seconds) up to which the go routine leak detection has to be retried.
    	leakDetectDeadline = 5
    	// pause time (in milliseconds) between each snapshot at the end of the go routine leak detection.
    	leakDetectPauseTimeMs = 50
    )
    
    // LeakDetect - type with  methods for go routine leak detection.
    type LeakDetect struct {
    	relevantRoutines map[string]bool
    }
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  3. src/main/java/jcifs/util/ResourceManager.java

            }
        }
    
        /**
         * Check for and report resource leaks
         */
        public void checkForLeaks() {
            if (!leakDetectionEnabled) {
                return;
            }
    
            // Process phantom references to detect leaks
            Reference<?> ref;
            while ((ref = referenceQueue.poll()) != null) {
                handlePhantomReference(ref);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.2K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb/BufferCacheImpl.java

         */
        @Override
        public void releaseBuffer(final byte[] buf) {
            if (buf == null) {
                return;
            }
            // better safe than sorry: prevent leaks if there is some out of bound access
            Arrays.fill(buf, (byte) 0);
            synchronized (this.cache) {
                if (this.freeBuffers < this.cache.length) {
                    for (int i = 0; i < this.cache.length; i++) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  5. src/main/java/jcifs/SmbResourceException.java

     */
    
    package jcifs;
    
    /**
     * Exception for resource-related SMB errors
     *
     * This exception is thrown when resource issues occur such as:
     * - File handle leaks
     * - Connection pool exhaustion
     * - Memory allocation failures
     * - Quota exceeded
     */
    public class SmbResourceException extends SmbException {
    
        private static final long serialVersionUID = 1L;
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  6. cmd/dynamic-timeouts.go

    	if duration < 0 {
    		return
    	}
    	entries := int(atomic.AddInt64(&dt.entries, 1))
    	index := entries - 1
    	if index < dynamicTimeoutLogSize {
    		dt.mutex.Lock()
    		dt.log[index] = duration
    
    		// We leak entries while we copy
    		if entries == dynamicTimeoutLogSize {
    			// Make copy on stack in order to call adjust()
    			logCopy := [dynamicTimeoutLogSize]time.Duration{}
    			copy(logCopy[:], dt.log[:])
    
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

                // Force release the handle with null checks
                if (this.usageCount != null) {
                    this.usageCount.set(0);
                }
    
                // Clear references to prevent memory leaks
                try {
                    if (this.treeConnection != null) {
                        // Release the tree connection if possible
                        log.debug("Releasing tree connection during emergency cleanup");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb/BufferCacheImplTest.java

            // Fill with non-zero to verify zeroing on release
            for (int i = 0; i < b.length; i++) {
                b[i] = (byte) (i + 1);
            }
    
            // Act: release should zero immediately to avoid leaks
            impl.releaseBuffer(b);
    
            // Assert: original array is zeroed in-place
            for (byte value : b) {
                assertEquals(0, value, "Released buffer must be zeroed");
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb/SmbFileHandleImpl.java

                log.error("Error during file handle finalization", e);
            } finally {
                super.finalize();
            }
        }
    
        /**
         * Emergency cleanup method to prevent resource leaks during finalization
         */
        private void emergencyCloseHandle() {
            try {
                synchronized (this) {
                    // Force close the handle
                    this.open = false;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.4K bytes
    - Viewed (1)
  10. src/main/java/jcifs/smb/SmbTreeImpl.java

                log.error("Error during tree finalization", e);
            } finally {
                super.finalize();
            }
        }
    
        /**
         * Emergency cleanup method to prevent memory leaks during finalization
         */
        private void emergencyCleanup() {
            try {
                // Force usage count to zero
                this.usageCount.set(0);
    
                synchronized (this) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
Back to top