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

From: Jim Meyering <[email-masked]>
Date: Wed, 07 Jul 2010 00:18:17 +0200

Paul Eggert wrote:
> On 07/04/10 03:00, Jim Meyering wrote:
>
>> Paul, one question I have is whether to include an initial_inode_set_size
>> parameter in your di_set_alloc function.  That would make it more
>> efficient in the event that an application happens to know in advance the
>> number of inodes it will process (say if it's processing a single device
>> and all of its inodes).  However, there's no rush to address that --
>> you're welcome to push this as-is.
>
> Thanks.  Yes, the extra parameter would help for that; I had omitted
> it because I couldn't think of a useful real-world case.  For now I pushed
> it without that change (please see below).  This incorporates all your other
> suggestions, plus the performance improvement with 32-bit % that I mentioned
> earlier today.
>
>>>From f6e2e13d3fee5219a6daece59ec9cc6241a04813 Mon Sep 17 00:00:00 2001
> From: Paul Eggert <[email-masked]>
> Date: Tue, 6 Jul 2010 14:53:14 -0700
> Subject: [PATCH] du: Hash with a mechanism that's simpler and takes less memory.

Thanks!

A minor nit for next time:
  du: Hash with a mechanism that's simpler and takes less memory.
please do not capitalize and omit the period on the one-line summary

One more thing:
It fails to compile on x86_64 with -Werror:

  cc1: warnings being treated as errors
  di-set.c: In function 'di_ent_hash':
  di-set.c:86: error: right shift count >= width of type
  make[4]: *** [di-set.o] Error 1