I am running some processing code for a large array (on a Pentium running Linux). Array sizes are large enough to exchange processes. While this works, perhaps because I try to keep reading and writing contiguous. However, I will soon have to process large arrays. In this case, switching to anonymous mmapped blocks will help?
If you would, please explain why.
In my shallow understanding, mmap implements a memory mapping file installed from the tmpfs section, which, under the pressure of memory, returns to the exchange mechanism. I would like to understand how mmap does this better than standard malloc (for the sake of argument or reason, I assume it is really better, I donβt know if that is).
Note. Please do not offer to get 64-bit or more RAM. This, unfortunately, is not an option.
source share