Hello. I work in C ++ Builder 6. The question is as follows.

Need to save lines to file. Lines a lot. About 300-800 mb. Saving can be done through streams with saving to a file. But I would like to avoid using a large amount of RAM.

I found the information that this can be done through file translation in memory using WinAPI .

But all the examples I could find worked only with the files already created. And independent attempts to work in this way with the file came to nothing. Maybe someone has this kind of example?

  • one
    dwMaximumSizeHigh and dwMaximumSizeLow tried to prescribe in CreateFileMapping? - Vladimir Martyanov
  • And why did you decide that "saving through streams to a file" will take a lot of memory - at least more than when writing to a memory mapped file? ... - Harry
  • Do you have code that eats a lot of memory when saving? Then show it. If there is no code yet, then what is the problem? - αλεχολυτ

0