src/org/jnetpcap/nio/DisposableGC.java
public synchronized void invokeSystemGCAndWait() {

		long ts = System.currentTimeMillis();
		long low = JMemory.availableDirectMemory();

		try {
			if (isCleanupThreadActive()) {
				memorySemaphore.acquire(memorySemaphore.availablePermits());
				memorySemaphore.tryAcquire(MIN_MEMORY_RELEASE,
						OUT_OF_MEMORY_TIMEOUT,
						TimeUnit.MILLISECONDS);
			} else {
				invokeSystemGC();
				drainRefQueue(OUT_OF_MEMORY_TIMEOUT);
			}
		} catch (IllegalArgumentException e) {
		} catch (InterruptedException e) {
		}

		if (vverbose) {
			System.out.printf("DisposableGC: waiting for System.gc to finish:"
					+ " %dms, freed=%dMbytes%n",
					(System.currentTimeMillis() - ts),
					(JMemory.availableDirectMemory() - low) / (1024 * 1024));
		}
	}
/**
	 * Invoke system gc and wait.
	 */
Invoke system gc and wait.
Invoke system gc and wait .
public synchronized void invokeSystemGCAndWait() {
		long ts = System.currentTimeMillis();
		long low = JMemory.availableDirectMemory();
		try {
			if (isCleanupThreadActive()) {
				memorySemaphore.acquire(memorySemaphore.availablePermits());
				memorySemaphore.tryAcquire(MIN_MEMORY_RELEASE,
						OUT_OF_MEMORY_TIMEOUT,
						TimeUnit.MILLISECONDS);
			} else {
				invokeSystemGC();
				drainRefQueue(OUT_OF_MEMORY_TIMEOUT);
			}
		} catch (IllegalArgumentException e) {
		} catch (InterruptedException e) {
		}
		if (vverbose) {
			System.out.printf("DisposableGC: waiting for System.gc to finish:"
					+ " %dms, freed=%dMbytes%n",
					(System.currentTimeMillis() - ts),
					(JMemory.availableDirectMemory() - low) / (1024 * 1024));
		}
	}
public synchronized void invokeSystemGCAndWait ( ) { long ts = System . currentTimeMillis ( ) ; long low = JMemory . availableDirectMemory ( ) ; try { if ( isCleanupThreadActive ( ) ) { memorySemaphore . acquire ( memorySemaphore . availablePermits ( ) ) ; memorySemaphore . tryAcquire ( MIN_MEMORY_RELEASE , OUT_OF_MEMORY_TIMEOUT , TimeUnit . MILLISECONDS ) ; } else { invokeSystemGC ( ) ; drainRefQueue ( OUT_OF_MEMORY_TIMEOUT ) ; } } catch ( IllegalArgumentException e ) { } catch ( InterruptedException e ) { } if ( vverbose ) { System . out . printf ( "DisposableGC: waiting for System.gc to finish:" + " %dms, freed=%dMbytes%n" , ( System . currentTimeMillis ( ) - ts ) , ( JMemory . availableDirectMemory ( ) - low ) / ( 1024 * 1024 ) ) ; } }
Invoke system gc and wait.
Invoke system gc and wait .