[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] using mmap files as strings?
From: |
Alex Shinn |
Subject: |
Re: [Chicken-users] using mmap files as strings? |
Date: |
Sat, 23 Oct 2010 11:19:59 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) |
Peter Bex <address@hidden> writes:
> On Fri, Oct 22, 2010 at 06:20:01AM -0400, Felix wrote:
>>
>> > I'm specifically interested in running regular
>> > expressions across the mmap space.
>>
>> irregex provides a "chunk" based API, perhaps it is possible to
>> define chunks over the data represented by the mmap pointer.
>> Alex or Peter might be able to tell more about this.
>
> The chunked API requires being able to extract strings from the mmapped
> memory. Chunks also only move forward, so you can't backtrack.
> If the SRE gets compiled to a backtracking matcher you probably
> want to include a few "commit"s because otherwise all chunks stick
> around in memory, I think. I'm not exactly sure how it handles that
> though.
Actually, currently even non-backtracking regexps will hold
onto all chunks.
The intention of the chunked API is to make it easy to work
with non-consecutive strings, not strings that can't fit
into memory. Specifically, I wanted to be able to handle
any kind of text-buffer (gap-buffer, piece-table, etc.)
easily.
--
Alex
Re: [Chicken-users] using mmap files as strings?, F. Wittenberger, 2010/10/27