tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Using mmap(2) in sort(1) instead of temp files
On Thu, Apr 04, 2024 at 02:38:02PM +0200, Martin Husemann wrote:
>
> Since the original comment hints at "instead of temp files" it is pretty
> clear that the second variant is meant. This avoids all file system operations
> and if the machine you run on has enough free memory it might not even actually
> touch swap space.
>
Why not stat the input file and decide to use in memory iff the file is
small enough? This way sort will handle large sorts on small memory
machines automatically.
--
Brett Lymn
--
Sent from my NetBSD device.
"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"
Home |
Main Index |
Thread Index |
Old Index