From 1a27b78d321b58dd5241038799c62e6e180e692e Mon Sep 17 00:00:00 2001 From: Robert Smith Date: Mon, 26 Feb 2024 00:09:16 -0800 Subject: [PATCH] use mmap:madvise natively --- src/mmap-patches.lisp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/mmap-patches.lisp diff --git a/src/mmap-patches.lisp b/src/mmap-patches.lisp deleted file mode 100644 index e1dce18..0000000 --- a/src/mmap-patches.lisp +++ /dev/null @@ -1,24 +0,0 @@ -;;; This file contains patches for the MMAP system. - -(in-package #:mmap) - -(cffi:defcenum (madvise-option :int) - ;; Conventional advise values - ;; - ;; From /usr/include/asm-generic/mman-common.h - (:madv-normal 0) - (:madv-random 1) - (:madv-sequential 2) - (:madv-willneed 3) - (:madv-dontneed 4)) - -(cffi:defcfun (u-madvise "madvise") :int - (address :pointer) - (length size-t) - (advice madvise-option)) - -(defun madvise (addr size advice) - (unless (zerop (u-madvise addr size advice)) - (error "madvise failed")) - nil) -(export '(madvise) :mmap)