You will fall into one of them when you memory map a file and then call write while another process truncates the same file.
例如,考虑一下在内存中对文件进行映射后调用write,与此同时另外一个进程将同一文件截断的情形。
It may use too much memory if you compile and run the GNU debugger, probably because it tends to open a window whenever you step into a program call.
如果您编译运行gnu调试器,可能会使用太多内存,或许是因为您进入一个程序呼叫时,它都试图打开一个窗口。
You'd open a file; you could call read, and it could read an entire file for you into memory if you like.
打开文件、调用读取操作、将整个文件读入内存,都是可以的。
应用推荐