There was an implicit request on the user-guile mailing list (20 Jul 2017) to
provide a scheme language call to mmap.
I am working on a prototype and will post when I get a simple case working.
Here is non-working code so far:
Currently I have this in a file “mmap.c” and #including into files
Works on guile-2.2.2:
> (use-modules (system foreign))
> (define raw (mmap %null-pointer #x1000 (logior PROT_READ PROT_WRITE)
(logior MAP_ANON MAP_PRIVATE) -1 0))
> (munmap raw #x1000)
$ diff filesys.c.orig filesys.c
+ #include "mmap.c"
+
void
scm_init_filesys ()
{
+ MMAP_DEFS;