"Malcolm" <regniztar@btinternet.comwrites:
Quote:
<yancheng.cheok@gmail.comwrote in message
news:1163618273.541831.8110@m7g2000cwm.googlegroup s.com...
|
[...]
Quote:
Quote:
>fmemopen is what we are looking for. however, since we are developing
>is MSVC windows platform, i was wondering whether there is any portable
>library to do so?
>>
| Sadly, this is a major weakness in the standard. There is no way of creating
memory files or indeed and user-defined type of stream.
|
There's no standard way of specifying that a given file exists in
memory. But then again, there's no standard way of specifying that a
given file exists on disk. The interpretation of a file name is
entirely system-specific.
An implementation could easily specify a particular form of file name
that refers to in-memory files; then all the machinery that normally
deals with disk files should just work. I wonder why more
implementations don't do this.
(Some implementations can implement in-memory file systems, but
there's no good way to tell that a given file is on such a file
system. For example, <OT>"/tmp" might be implemented as swapfs on one
system, as a physical disk on another, and even as a remote
NFS-mounted filesystem on yet another, with all three systems running
the same version of the same operating system.</OT>)
--
Keith Thompson (The_Other_Keith)
kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.