From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Olivier Dion via "Developers list for Guile, the GNU extensibility library" Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: mmap for guile Date: Sun, 26 Jun 2022 13:06:04 -0400 Message-ID: <87zghzwe0z.fsf@laura> References: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com> Reply-To: Olivier Dion Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37983"; mail-complaints-to="usenet@ciao.gmane.io" To: Matt Wette , guile-devel@gnu.org, Guile User Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Jun 26 19:06:40 2022 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5ViZ-0009lh-ST for guile-devel@m.gmane-mx.org; Sun, 26 Jun 2022 19:06:39 +0200 Original-Received: from localhost ([::1]:46410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5ViY-00038s-8U for guile-devel@m.gmane-mx.org; Sun, 26 Jun 2022 13:06:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5ViI-00038K-M7; Sun, 26 Jun 2022 13:06:22 -0400 Original-Received: from smtp.polymtl.ca ([132.207.4.11]:44657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5ViE-0006b6-MY; Sun, 26 Jun 2022 13:06:21 -0400 Original-Received: from localhost (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 25QH64ie001481; Sun, 26 Jun 2022 13:06:08 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 25QH64ie001481 In-Reply-To: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com> X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Sun, 26 Jun 2022 17:06:04 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21244 gmane.lisp.guile.user:18346 Archived-At: On Sun, 26 Jun 2022, Matt Wette 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