bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] sort: Add --threads option, which parallelizes internal sort


From: Chen Guo
Subject: Re: [PATCH] sort: Add --threads option, which parallelizes internal sort.
Date: Sun, 18 Oct 2009 21:52:21 -0700 (PDT)

Ah how ridiculously careless of me. >.<

I've ran through the checklist you provided, minus the mallocs. When would it 
be not ok to exit upon malloc failure? I've ran through all of sort.c and it 
seems in all cases of memory allocation xmalloc or xnmalloc are used. Thanks!



----- Original Message ----
From: Jim Meyering <address@hidden>
To: Chen Guo <address@hidden>
Cc: address@hidden
Sent: Sunday, October 18, 2009 11:16:18 AM
Subject: Re: [PATCH] sort: Add --threads option, which parallelizes internal 
sort.

Chen Guo wrote:
>     In my last patch submission I noted while sorting in LC_ALL the endline 
> characters of a couple of lines would be randomly cut off. The cause was 
> memcoll being not threadsafe, I've since included a workaround.
....
> +      /* If singlethreaded, the merge uses the memory optimization
> +     suggested in Knuth exercise 5.2.4-10; see sortlines.  */
> +      size_t bytes_per_line = 3*sizeof (struct line);
> +                  - (1 < nthreads ? 0 : sizeof (struct line)*3/2);

I nearly forgot to point out the above.
There's a stray semicolon.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]