bug-coreutils
[Top][All Lists]
Advanced

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

bug#6524: du now uses less than half as much memory, sometimes


From: Paul Eggert
Subject: bug#6524: du now uses less than half as much memory, sometimes
Date: Thu, 08 Jul 2010 11:18:25 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5

On 07/07/10 03:03, Jim Meyering wrote:

> Do you know of any system on which sizeof dev_t is larger
> than two times sizeof size_t?  I was wondering if the added
> (sizeof dev % sizeof h != 0) term is actually necessary anywhere.
> The largest dev_t I've seen is 8 bytes wide.  Just curious.
> I know it is required, just in case.

I don't know of any, no.  I imagine there may be some hosts
that have 16-bit size_t and 64-bit ino_t, but the GNU coding standards
say that we don't have to worry about such hosts.  The general-case
code is mainly there to document the general case and to make it
clear what the intent is: I can't imagine any host where the
(sizeof dev % sizeof h != 0) term is actually needed.

It's just a hash function, so the code will still work even
if the loop is removed completely; but it won't hash nearly
as well on Cygwin, I expect.





reply via email to

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