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/ _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users