where did all my memory go? (file system cache)
Julian Elischer
julian at elischer.org
Thu Feb 17 22:14:59 GMT 2005
Joseph Koshy wrote:
>>what I want is:
>>
>>int fd = open("myfile",...);
>>write1GBfiletodisk(fd, data);
>>ioctl(fd, PURGEFROMCACHE);
>>perform_md5(fd);
>>
>>and be sure that teh MD5 is that of what is on the disk.
>>not what is in RAM.
>>
>>
>
>unmount(file-system-of("myfile")) (even if it fails) ?
>
>
I actually heard this trick before.. I can't say I'm enthusiastic about it..
it also forces the flushing of a lot of stuff I may not want to flush, (yet)
I don't want to force my other apps to have to reload their cached data.
Neat trick though.
>
>
>
More information about the freebsd-current
mailing list