bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH gnumach 3/3] ipc: use fast modulo operation in local hash tab


From: Justus Winter
Subject: Re: [PATCH gnumach 3/3] ipc: use fast modulo operation in local hash table
Date: Tue, 30 Sep 2014 16:16:29 +0200
User-agent: alot/0.3.5

Quoting Samuel Thibault (2014-09-30 14:23:34)
> Justus Winter, le Tue 30 Sep 2014 14:06:18 +0200, a écrit :
> > @@ -45,6 +45,8 @@
> >   *   an ipc_table_size structure.  These structures must
> >   *   be elements of an array, ipc_table_entries.
> >   *
> > + *   Every its_size value must must be a power of two.
> 
> Perhaps add a runtime check which makes sure of that?

Hm, where would you put that?  The size tables (ipc_table_entries and
ipc_table_dnrequests) are filled once by ipc_table_fill.  The fact
that all the sizes are powers of two is mentioned there in the
comments (I'm assuming that PAGE_SIZE is always a power of two).

I just wanted to make this explicit in ipc_table.h so that we can rely
on that for the modulo operation.

Justus



reply via email to

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