From: Maxime Devos <maximedevos@telenet.be>
To: Matt Wette <matt.wette@gmail.com>,
guile-devel@gnu.org, Guile User <guile-user@gnu.org>
Subject: Re: mmap for guile
Date: Sun, 26 Jun 2022 20:21:05 +0200 [thread overview]
Message-ID: <bc1f3cd42df3267184c226bf4390620ea10f4d43.camel@telenet.be> (raw)
In-Reply-To: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
Matt Wette schreef op zo 26-06-2022 om 08:37 [-0700]:
> 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:
The types aren't documented and I don't think just referring to the man
page is sufficient, because C and Scheme have actually different APIs
and semantics -- e.g., if I don't care about the address, can I set it
to #false? Is it only fds or also ports? Why does the abbreviation
'addr' mean (why not in full: address, likewise for 'len')? C has its
own style of error reporting, but how does this map to Scheme? Do I get
a ENOENT return value, or a ENOENT system-error, an &i/o-file-is-read-
only, an &i/o-filename, an &i/o-invalid-position? Is the address a raw
number or a bytevector (made with pointer->bytevector) or a pointer?
Is the offset inside the file, or w.r.t. the current position?
I think it's fine to not document all the MAP_ flags, but I think we
need at least the basics (MAP_ANONYMOUS, PROT_READ, PROT_WRITE).
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
prev parent reply other threads:[~2022-06-26 18:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=bc1f3cd42df3267184c226bf4390620ea10f4d43.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=guile-devel@gnu.org \
--cc=guile-user@gnu.org \
--cc=matt.wette@gmail.com \
/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).