def do_fadvise64(fd, offset, length):
    global _posix_fadvise
    if _posix_fadvise is None:
        _posix_fadvise = load_libc_function('posix_fadvise64')
    # 4 means "POSIX_FADV_DONTNEED"
    _posix_fadvise(fd, ctypes.c_uint64(offset),
                   ctypes.c_uint64(length), 4)
def do_fadvise64(fd, offset, length):
    global _posix_fadvise
    if _posix_fadvise is None:
        _posix_fadvise = load_libc_function('posix_fadvise64')
    # 4 means "POSIX_FADV_DONTNEED"
    _posix_fadvise(fd, ctypes.c_uint64(offset),
                   ctypes.c_uint64(length), 4)
Exemple #3
0
 def test_load_libc_function(self):
     self.assert_(callable(
         utils.load_libc_function('printf')))
     self.assert_(callable(
         utils.load_libc_function('some_not_real_function')))
Exemple #4
0
 def test_load_libc_function(self):
     self.assert_(callable(
         utils.load_libc_function('printf')))
     self.assert_(callable(
         utils.load_libc_function('some_not_real_function')))
Exemple #5
0
 def test_load_libc_function(self):
     self.assert_(callable(utils.load_libc_function("printf")))
     self.assert_(callable(utils.load_libc_function("some_not_real_function")))