unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* mmap for guile
@ 2022-06-26 15:37 Matt Wette
  2022-06-26 16:21 ` Matt Wette
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Matt Wette @ 2022-06-26 15:37 UTC (permalink / raw)
  To: guile-devel, Guile User

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"'.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-07-21  9:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-26 15:37 mmap for guile Matt Wette
2022-06-26 16:21 ` 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

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).