From: Olivier Dion via "Developers list for Guile, the GNU extensibility library" <guile-devel@gnu.org>
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 13:06:04 -0400 [thread overview]
Message-ID: <87zghzwe0z.fsf@laura> (raw)
In-Reply-To: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com>
On Sun, 26 Jun 2022, Matt Wette <matt.wette@gmail.com> wrote:
> flags
> (logior MAP_ANON MAP_PRIVATE)
Why MAP_ANON instead of MAP_ANONYMOUS. The latter is more clear and you
don't have to care about compatibility like C does.
Also, does MAP_FIXED or MAP_FIXED_NOREPLACE is passed to `flags' if
`(not (eq? addr %null-pointer))'?
> scheme@(guile-user)> ,d mmap/search
What's the difference with `mmap'?
> 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"'.
I assume that this map the entire file at offset 0 with PROT_READ? In
that case, is it with MAP_SHARED or MAP_PRIVATE? I think it's important
to mentioned this point.
Regards,
old
--
Olivier Dion
oldiob.dev
next prev parent reply other threads:[~2022-06-26 17:06 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 [this message]
2022-06-26 18:11 ` Maxime Devos
2022-07-04 10:09 ` Ludovic Courtès
2022-07-04 13:14 ` Greg Troxel
2022-07-04 20:03 ` Ludovic Courtès
2022-07-05 12:49 ` Greg Troxel
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=87zghzwe0z.fsf@laura \
--to=guile-devel@gnu.org \
--cc=guile-user@gnu.org \
--cc=matt.wette@gmail.com \
--cc=olivier.dion@polymtl.ca \
/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).