chicken-users
[Top][All Lists]
Advanced

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

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


From: F. Wittenberger
Subject: Re: [Chicken-users] using mmap files as strings?
Date: Wed, 27 Oct 2010 14:02:15 +0200

Am Donnerstag, den 21.10.2010, 15:01 -0600 schrieb Alan Post:
> So far so good, that is what I would expect.  I'd like to work with
> an mmap buffer like a string.  Is it possible to create an object
> that will treat the mmap area as a string that I can run regular
> string operations on without copying the mmap buffer?  I'm
> specifically interested in running regular expressions across the
> mmap space.

Among other reasons this is one why I've been contemplating how one
could intercept chicken's string handling.

Another application would be shared substrings.  Or the combination of
both.  Example: feed a file content to a port, formatted as HTTP chunked
encoding.  A shared substring pointing right into the mmaped file could
save all copying.  The expense would be one object allocation holding
#{pointer, start, end}.

However this would somehow have to overwrite the basic string handling.
I have not yet tried that, but at least the utf8 egg hints that it must
be possible to do so.






reply via email to

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