>>>>> "Edi" == Edi Weitz <[EMAIL PROTECTED]> writes:

    >> Will simple-streams mapped-file-simple-stream do what you want?

    Edi> I'm just about to download CMUCL from c-l.net to give simple streams a
    Edi> try because they don't work for me with the Debian version.  Even then
    Edi> I'll first have to figure out how to get a
    Edi> mapped-file-simple-stream... :)

(open "file" :class 'stream:mapped-file-simple-stream)  But that's the
limit of my knowledge of simple-streams.

    Edi> But, actually, the answer is "no" - if possible I'd like to have
    Edi> random access to the mmap'ed data.

Won't file-position give you random access?  Probably too slow for
what you want, though.

    Edi> What exactly is this "smashing?"  Sorry, I've never heard this term in
    Edi> connection with CMUCL or CL.

Something I picked up from CMUCL sources, I think.  What I meant is
that you create an array-header object and manually replace (smash)
the elements of the array-header with the stuff you want using system
internal functions.  An array-header contains, among other things, a
data-vector slot which you can replace with a pointer to your mmap'ed
data.  But you can't just use the mmap'ed address.  The pointer needs
to be point to a specialized vector, which includes a one-word header,
a length slot, followed by the data.  So you need to massage the
mmap'ed area to include 2 extra words at the beginning.  I don't know
if that's possible to do or not.

If you're interested in this approach, I can help out.

Ray


Reply via email to