src/java.base/share/classes/sun/nio/ch/Util.java
branchunixdomainchannels
changeset 58848 c3df0f8b6d93
parent 58801 119ac9128c1b
equal deleted inserted replaced
58847:692de65ab293 58848:c3df0f8b6d93
   280     /**
   280     /**
   281      * Releases a temporary buffer by returning to the cache or freeing it. If
   281      * Releases a temporary buffer by returning to the cache or freeing it. If
   282      * returning to the cache then insert it at the start so that it is
   282      * returning to the cache then insert it at the start so that it is
   283      * likely to be returned by a subsequent call to getTemporaryDirectBuffer.
   283      * likely to be returned by a subsequent call to getTemporaryDirectBuffer.
   284      */
   284      */
   285     public static void offerFirstTemporaryDirectBuffer(ByteBuffer buf) {
   285     static void offerFirstTemporaryDirectBuffer(ByteBuffer buf) {
   286         // If the buffer is too large for the cache we don't have to
   286         // If the buffer is too large for the cache we don't have to
   287         // check the cache. We'll just free it.
   287         // check the cache. We'll just free it.
   288         if (isBufferTooLarge(buf)) {
   288         if (isBufferTooLarge(buf)) {
   289             free(buf);
   289             free(buf);
   290             return;
   290             return;