[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] using mmap files as strings?
From: |
Alaric Snell-Pym |
Subject: |
Re: [Chicken-users] using mmap files as strings? |
Date: |
Tue, 02 Nov 2010 13:22:01 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.1.9) Gecko/20100520 Lightning/1.0b2pre Shredder/3.0.4 |
On 10/27/10 13:02, Jörg F. Wittenberger wrote:
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}.
Just FYI, ages ago I wondered if it would be a good idea to make an
underlying "blob abstraction" that's a pointer, a size, and a custom
freeing function, so it can wrap malloc()ed memory, mmap()ed memory, and
whatever other special things might exist.
Then have blobs, strings, srfi-4 vectors, and friends all have the
option of being a reference to one of the above with an offset and
limit, so they can be views into arbitrary data from external sources.
ABS
--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
- Re: [Chicken-users] using mmap files as strings?,
Alaric Snell-Pym <=