Justus Winter, le Tue 30 Sep 2014 16:16:29 +0200, a écrit :
> Hm, where would you put that? The size tables (ipc_table_entries and
> ipc_table_dnrequests) are filled once by ipc_table_fill.
Ah, right, so it's powers of two by construction, good.
Then ack.
Samuel
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
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 su
* ipc/ipc_table.h: Document that table sizes must be powers of two.
* ipc/ipc_hash.c (IH_LOCAL_HASH): Use fast modulo operation.
---
ipc/ipc_hash.c | 2 +-
ipc/ipc_table.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/ipc/ipc_hash.c b/ipc/ipc_hash.c
index 8285717..c2c6d6e