Sfio allows turning on/off the SF_READ mode for a stream opened for read&write with something like "sfset(stream, SF_READ, 0);"
That followed by "sfsetbuf(stream, NULL, 0);" should turn on mmap for reading. The sfsetbuf() call with no buffer specified tell Sfio to use whatever buffering scheme it thinks is best for the stream. Phong > From [email protected] Wed Apr 3 13:31:23 2013 > Subject: Re: [ast-developers] sfio mmap() read support broken? > To: Phong Vo <[email protected]> > Cc: [email protected], [email protected] > On 3 April 2013 19:27, Phong Vo <[email protected]> wrote: > > > > Dave asked me about this yesterday so I looked. > > > > sftmp() creates a stream for both read and write so it has a buffer. > > That buffer will continue to be used even if the stream is turned into a > > file stream. If the stream is read-only, the shell could reset its buffer > > to NULL to cause mmap() to be used. > is there a sfmakestreamreadonly() call to make the stream returned by > sftmp() read-only once the command substitution filled it up? > Ced > -- > Cedric Blancher <[email protected]> > Institute Pasteur _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
