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