I got some huge files I need to parse, and people have been recommending mmap because this should avoid having to allocate the entire file in-memory.
But looking at
top
has many memory-related columns. Most of them are based on the size of the memory space mapped to the process; including any shared libraries, swapped out RAM, and mmapped space.
Check the RES
column, this is related to the physical RAM currently in use. I think (but not sure) it would include the RAM used to 'cache' the mmap'ped file