From f8057e8805c8729cef142c4b550b869b6c7273e7 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 26 Oct 2020 00:07:12 -0700 Subject: [PATCH] lib/matchfinder: document matchfinder_rebase() preconditions --- lib/matchfinder_common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/matchfinder_common.h b/lib/matchfinder_common.h index 1f18f8be..49ff3343 100644 --- a/lib/matchfinder_common.h +++ b/lib/matchfinder_common.h @@ -75,6 +75,9 @@ matchfinder_init(mf_pos_t *data, size_t size) * hash bucket. Note that in the latter table, the links are 1-ary in the case * of "hash chains", and 2-ary in the case of "binary trees". In either case, * the links need to be rebased in the same way. + * + * 'data' must be aligned to a MATCHFINDER_MEM_ALIGNMENT boundary, and + * 'size' must be a multiple of MATCHFINDER_SIZE_ALIGNMENT. */ #ifndef matchfinder_rebase static forceinline void