> PS: It was mentioned in the TODO file
> > speed up sort(1) by using mmap(2) rather than temp files
I can't find this reference :-(
It's in src/doc/TODO (line 41)
https://github.com/NetBSD/src/blob/6b2da37d700ac979e2a4dc4413082e5a879be9b6/doc/TODO#L41
(I reposted this on
On Fri, Apr 05, 2024 at 06:48:05AM +, David Holland wrote:
>- read or write errors on memory mapped files result in SIGSEGV,
> which is annoying to deal with and does actually turn up in the
> field sometimes (*);
Oops, looks like I forgot to populate the asterisk.
(*)
On Wed, Apr 03, 2024 at 05:40:47PM +, Ice Cream wrote:
> I'm trying to speed up sort(1) by using mmap(2) instead of temp
> files.
>
> ftmp() (see code below) is called in the sort functions to create and
> return a temp file. mkstemp() is used to create the temp file, t
Why is this on tech-kern? It seems to me it belongs on tech-userlevel.
> I'm trying to speed up sort(1) by using mmap(2) instead of temp
> files.
If you're going to sort in RAM, why bother with temporaries at all?
Just slurp it all in and sort it in core.
But.
Part of the point of usin
I'm trying to speed up sort(1) by using mmap(2) instead of temp
files.
ftmp() (see code below) is called in the sort functions to create and
return a temp file. mkstemp() is used to create the temp file, then
the file pointer (returned by fdopen) is returned to the sort functions
for use. I'm