84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
查了点资料,首先f开头的如:fprintf,fscanf这些函数肯定是经过缓存的。然后一开始我以为read()和write()函数不经过缓存,直接读写硬盘文件,没想到有人说这两个函数还是要经常内核的缓存,那不管怎么说,是要经过内存的。那问题来了,到底有没有不经过内存(不管是用户态的还是内核态的缓存),而直接读写硬盘的I/O函数啊?
刚刚查阅资料,cpu是基于内存寻址,不可能和硬盘进行直接数据交互,所以我上面那个问题看起来是没有答案了
业精于勤,荒于嬉;行成于思,毁于随。
file_put_contens() writes directly to the hard disk
file_put_contens() writes directly to the hard disk