This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于NDK中的文件生成函数的为



请问,NDK中动态生成TXT文件时,文件内容是保存在原内存区,还是拷贝了一份;或者说当我把一段内存生成了TXT文件,然后内存内容变更了,然后访问txt文件,文件中的内容是变更前的还是变更后的

  • 参见ndk手册里efs_createfile的说明

    This function creates an internal record of the RAM based file with the indicated
    filename, file length, and data pointer. The file data is not copied, so the buffer must be
    statically allocated. The filename is copied, so it does not need to be static.