[Top][All Lists]
[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: |
Tue, 02 Nov 2010 15:28:11 +0100 |
Am Dienstag, den 02.11.2010, 13:22 +0000 schrieb Alaric Snell-Pym:
> 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,
A so called "finalizer" to speak with chicken Scheme terms. ;-)
> 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.
Pretty much how I'd like things to be!