unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: guile-devel@gnu.org, Guile User <guile-user@gnu.org>
Subject: mmap for guile
Date: Sun, 26 Jun 2022 08:37:01 -0700	[thread overview]
Message-ID: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com> (raw)

I have a candidate mmap implementation for guile (3.0.8) in

	github.com/mwette/guile-contrib/patch/3.0.8/mmap-api.patch

It probably needs some review and update.  Maybe windows mmap-file would be nice.
I'm not sure I updated the configure correctly but --disable-mmap-api should remove.
It exposes features 'mmap-api and 'mmap-file.

scheme@(guile-user)> ,d mmap
- Scheme Procedure: mmap addr len [prot [flags [fd [offset]]]]
      See the man page.  Returns a bytevector.  Note that the region
      returned by mmap will NOT be searched by the garbage collector for
      pointers.  See also mmap/search.  Defaults are:

      prot
           (logior PROT_READ PROT_WRITE)

      flags
           (logior MAP_ANON MAP_PRIVATE)

      fd
           -1

      offset
           0

scheme@(guile-user)> ,d mmap/search
- Scheme Procedure: mmap/search addr len [prot [flags [fd [offset]]]]
      See the unix man page for mmap.  Returns a bytevector.  Note that
      the region allocated will be searched by the garbage collector for
      pointers.  Defaults:

      prot
           (logior PROT_READ PROT_WRITE)

      flags
           (logior MAP_ANON MAP_PRIVATE)

      fd
           -1

      offset
           0

scheme@(guile-user)> ,d mmap-file
- Scheme Procedure: mmap-file file [prot]
      This procedure accepts a file in the form of filename, file-port or
      fd.  It returns a bytevector.  It must not contain scheme allocated
      objects as it will not be searched for pointers.  Default PROT is
      `"r"'.




             reply	other threads:[~2022-06-26 15:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26 15:37 Matt Wette [this message]
2022-06-26 16:21 ` mmap for guile Matt Wette
2022-06-26 17:06 ` Olivier Dion via Developers list for Guile, the GNU extensibility library
2022-06-26 18:11 ` Maxime Devos
2022-07-04 10:09   ` Ludovic Courtès
2022-07-04 12:59     ` Matt Wette
2022-07-04 13:14     ` Greg Troxel
2022-07-04 20:03       ` Ludovic Courtès
2022-07-19 13:20     ` Maxime Devos
2022-07-21  9:14       ` Ludovic Courtès
2022-07-19 13:30     ` Maxime Devos
2022-07-19 13:34     ` Maxime Devos
2022-06-26 18:21 ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56ee7537-1666-3d04-7093-732a75624e9b@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).