How do I create a file in virtual memory and can I use normal file functions on it as CreateFile, WriteFile etc. ?
I am trying to implement a buffered file writer class, but the problem is managing a buffer that needs dynamic constant reallocation.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I think,you want the whole file inside Virtual Memory? But it feels a little difficult to me, and thus I have got another workaround for it.You can use VirtualAllocExNuma to load your file in memory and work on it.Since Virtual Memory is that part of the memory which is just supposed to be retained by OS but in physically it is scattered around different Non Uniform memory devices besides RAM.
It is not a filesystem where you can save your files and how it is managed is also difficult to be traced(at least for me!).
VirtualAllocExNuma