[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] using mmap files as strings?

From: Peter Bex
Subject: Re: [Chicken-users] using mmap files as strings?
Date: Fri, 22 Oct 2010 12:27:33 +0200
User-agent: Mutt/

On Fri, Oct 22, 2010 at 06:20:01AM -0400, Felix wrote:
> I can't think of a way in the moment. Strings require a header-word,
> and the data pointed to by a pointer doesn't have that header, so it
> isn't possible to "sneak in" a pointer as a replacement of a string.
> > 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

"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

reply via email to

[Prev in Thread] Current Thread [Next in Thread]