I lack formal knowledge in Operating systems and C. My questions are as follows.
fread
in C, does the entire disk block containing that byte is brought into memory or just the byte? Here's my answers
setvbuffer
can change that. FILE
structure. This is implementation (compiler) specific so don't touch it. The above caching is used by the C runtime library not the OS. The OS may or may not have disk caching and is a separate mechanism.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.