def drop_buffer_cache(fd, offset, length):
 global _posix_fadvise
 if (_posix_fadvise is None):
  _posix_fadvise = load_libc_function('posix_fadvise64')
 ret = _posix_fadvise(fd, ctypes.c_uint64(offset), ctypes.c_uint64(length), 4)
 if (ret != 0):
  logging.warning('posix_fadvise64(%(fd)s, %(offset)s, %(length)s, 4) -> %(ret)s', {'fd': fd, 'offset': offset, 'length': length, 'ret': ret})

def drop_buffer_cache ( fd , offset , length ) : global _posix_fadvise if ( _posix_fadvise is None ) : _posix_fadvise = load_libc_function ( 'posix_fadvise64' ) ret = _posix_fadvise ( fd , ctypes . c_uint64 ( offset ) , ctypes . c_uint64 ( length ) , 4 ) if ( ret != 0 ) : logging . warning ( 'posix_fadvise64(%(fd)s, %(offset)s, %(length)s, 4) -> %(ret)s' , { 'fd' : fd , 'offset' : offset , 'length' : length , 'ret' : ret } )
drop buffer cache for the given range of the given file .