From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: mmap for guile Date: Sun, 26 Jun 2022 09:21:31 -0700 Message-ID: <69e529b7-2760-8932-5d86-f0dce1694974@gmail.com> References: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27486"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 To: guile-devel@gnu.org, Guile User Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sun Jun 26 18:21:55 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 1o5V1H-0006xE-5o for guile-devel@m.gmane-mx.org; Sun, 26 Jun 2022 18:21:55 +0200 Original-Received: from localhost ([::1]:58812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5V1G-0005xE-61 for guile-devel@m.gmane-mx.org; Sun, 26 Jun 2022 12:21:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5V10-0005wQ-Ch; Sun, 26 Jun 2022 12:21:38 -0400 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:34639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5V0y-00039x-IE; Sun, 26 Jun 2022 12:21:38 -0400 Original-Received: by mail-pf1-x429.google.com with SMTP id t21so6927903pfq.1; Sun, 26 Jun 2022 09:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:references:in-reply-to:content-transfer-encoding; bh=Jv4+bgeosB1DU458wAbIayY6Dc6EY0v62C0+j0IS7E0=; b=iWLuk8CqKNvjkwHxkirSBzu77LR/lrMxBMr+7DlCcr3JtE/JhNYJY4NiK5n7eAEg/u gLMQ2316ynTEbFUU2vXRQooZHJ7sYGQLakhko+frQS79gTJ4I0Dmxbe7YrjJkKBm3KVn GabEUU+IVRfL0EOIrcT/cp8YJPSNPAnhYMptlMZufmVB1xVEJ/7gY3nzXIjSt5vI7HmO MxV2yxT/GtSlT5ijU71KdCFrVA6FKK9w3GTmVPdqtleK+tOnZ6eXOSZuCvfEXIkF4LLm 4RRMTv4+8iO6DNtqjahc0hOI4Nw545tb87pTLv2WqokMcrlfKYMpmN362XJM60cHbxKn lIqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:references:in-reply-to :content-transfer-encoding; bh=Jv4+bgeosB1DU458wAbIayY6Dc6EY0v62C0+j0IS7E0=; b=KYMm2vQNYuTfjCyng/kvYyaj8c4b50yO1iFS3zi7eXulONDr0VsbU9mn5B3/fSqh9P W+MWYe0Kg2dBt1Cy7Wi+L5aVls/KMqaXUhJ8YlYqtr8STOm1EOh72Dq+JrRQBqWUeKiG mXghDngmAAvQNGFe1m3kb5lV8Vj7jJIRw0UpA91r8r0Ls4FvvWvdQa2zq63HiuO9t47T /9xA8gAkmdo2jVS7suCOYH1YpwBE5+NRCwici+LOKgzmi1Lw2zYv+/Z8gmk+8pmCI1d0 0AqRm7FhO+qIDs+0IWudQT3LDxzDtWHIKAqCZbegHnUnEiN55KLIardgDBZHk5jLaKnU rNsw== X-Gm-Message-State: AJIora8ibYlFclxHKs1iQoPk9WsnZlFMboynJkgpcodHOPL4snWKbJiQ RF0YcR++huWWQK9r0NFNaPwZPCPuBPI= X-Google-Smtp-Source: AGRyM1vR1PgWjjZLd/av6vqmX/cBb6AK5uMDGkyKX+KZB5BuRsrgHaAqxjqGnk/JsqFI1uKOhQKX4Q== X-Received: by 2002:a63:3e47:0:b0:40c:fa04:dd6e with SMTP id l68-20020a633e47000000b0040cfa04dd6emr8753107pga.224.1656260494316; Sun, 26 Jun 2022 09:21:34 -0700 (PDT) Original-Received: from [192.168.2.158] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id s7-20020a17090302c700b00168e83eda56sm5399964plk.3.2022.06.26.09.21.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jun 2022 09:21:33 -0700 (PDT) Content-Language: en-US In-Reply-To: <56ee7537-1666-3d04-7093-732a75624e9b@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=matt.wette@gmail.com; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:21243 gmane.lisp.guile.user:18345 Archived-At: Appologies: link is https://github.com/mwette/guile-contrib/blob/main/patch/3.0.8/mmap-api.patch On 6/26/22 8:37 AM, Matt Wette wrote: > 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"'. > >