Here's the implementation in Artanis, and all the constant like PROT_READ definition are ignored:
------------------ code ----------------- (define *libc-ffi* (dynamic-link)) (define %mmap (pointer->procedure '* (dynamic-func "mmap" *libc-ffi*) (list '* size_t int int int size_t))) (define %munmap (pointer->procedure int (dynamic-func "munmap" *libc-ffi*) (list '* size_t))) (define* (mmap size #:key (addr %null-pointer) (fd -1) (prot MAP_SHARED) (flags PROT_READ) (offset 0)) (pointer->bytevector (%mmap addr size prot flags fd offset) size)) (define (munmap bv size) (%munmap (bytevector->pointer bv size) size)) -------------------------end----------------------------- Comments? Thanks!