4 ms·
No, most implementations of sort use a bounded memory buffer and an external-memory algorithm, spilling to disk.
by ot 7y ago
No, most implementations of sort use a bounded memory buffer and an external-memory algorithm, spilling to disk.
- chii 7y agoI don't believe that - how does it spill to disk? TMP directory? You can still sort if you don't have any disk space (until you run out of swap?) from what I recall.
- chasil 7y agoThe man page for sort has parameters to adjust the location of the temporary files. These are only used when the allowed memory buffer is exhausted.
- JdeBP 7y agoYour recollection is either limited in what implementations you have encountered, or faulty. * https://unix.stackexchange.com/a/450900/5132 https://unix.stackexchange.com/a/450900/5132