]> git.sesse.net Git - vlc/commitdiff
Shrink overly large blocks
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 2 Sep 2008 14:57:31 +0000 (17:57 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 2 Sep 2008 15:02:25 +0000 (18:02 +0300)
src/misc/block.c

index 97281cb5f12020d99da92e08a96749ae04cc4f50..8c37bcfd22b8a9c7c8c223952b14c95ac75b965e 100644 (file)
@@ -168,10 +168,6 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
         return p_rea;
     }
 
-#if 0
-    /* Shrinking the buffer seems to cause performance problems, on Windows,
-     * at least. Also with demand paging, oversizing buffers is not an issue,
-     * as long as we don't write to the extraneous allocated space. */
     /* We have a very large reserved footer now? Release some of it. */
     if ((p_sys->p_allocated_buffer + p_sys->i_allocated_buffer) -
         (p_block->p_buffer + p_block->i_buffer) > BLOCK_WASTE_SIZE)
@@ -189,7 +185,6 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
                 - ((uintptr_t)p_sys->p_allocated_buffer % BLOCK_ALIGN);
         }
     }
-#endif
     return p_block;
 }