dimanche 28 août 2016

Will the data in fwrite() buffer be cleared when a program exists abnormally?

fwrite() is a library call that firstly buffers the data into a user space buffer, and then call the write() system call later to actually carry out the write operations. If a program invokes fwrite() to write some data to a file but then exists abnormally, will the buffer of fwrite() be cleared, or the buffered data will be left over in memory?

Aucun commentaire:

Enregistrer un commentaire