[Jprogramming] memory mapped files as non-volatile storage
Raul Miller
rauldmiller at gmail.com
Sun Nov 16 17:11:03 UTC 2014
That depends on the OS. And, the disk itself.
But J's practice of closing the file will flush it to disk. How long it
takes though, for the operation to complete, depends on what else is
happening (for the OS), and on details of the disk hardware (for the disk).
And, of course, computers sometimes fail...
And, occasionally, other bad things happen.
You just have to make a best effort.
Thanks,
--
Raul
On Sun, Nov 16, 2014 at 8:46 AM, Henry Rich <HenryHRich at nc.rr.com> wrote:
> I think you'd have the power-fail problem with delayed writes even if you
> use plain files. Writing to a file doesn't necessarily flush it to disk.
>
> Henry Rich
>
> On 11/16/2014 2:22 AM, Raul Miller wrote:
>
>> If your data is small, I'd just live with 1!:2 <'filename'
>>
>> Memory mapped files can be fun to work with, but I don't see any
>> advantages for a situation like this.
>>
>> Thanks,
>>
>> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
More information about the Programming
mailing list