From: Olivier Andrieu <andrieu@ijm.jussieu.fr>
To: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Bigarray.*.map_file
Date: Wed, 14 Sep 2005 16:07:32 +0200 [thread overview]
Message-ID: <17192.11940.997486.960780@karryall.dnsalias.org> (raw)
In-Reply-To: <26EB47FDD566A7469FC862DAF373792F07D5E0@kaiserslautern1.lmsintl.com>
Hi,
Bauer, Christoph [Wednesday 14 September 2005] :
> Bigarray.Genarray.map_file uses mmap to "read" a file. How can
> I specify an offset in the file (like the offset parameter in mmap)?
> Unix.lseek doesn't help me.
You can't: mmap is called with offset 0 (see
otherlibs/bigarray/mmap_unix.c).
> How can I do an munmap? I ask because of these lines from the man-page:
>
> The munmap system call deletes the mappings for the speci-
> fied address range, and causes further references to
> addresses within the range to generate invalid memory ref-
> erences. The region is also automatically unmapped when
> the process is terminated. On the other hand, closing the
> file descriptor does not unmap the region.
unmap() is called when the bigarray is collected by the GC.
--
Olivier
prev parent reply other threads:[~2005-09-14 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 13:43 Bigarray.*.map_file Bauer, Christoph
2005-09-14 14:07 ` Olivier Andrieu [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17192.11940.997486.960780@karryall.dnsalias.org \
--to=andrieu@ijm.jussieu.fr \
--cc=Christoph.Bauer@lms-gmbh.de \
--cc=caml-list@inria.fr \
/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