diff options
author | Luca Deri <deri@ntop.org> | 2020-07-22 11:28:14 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-07-22 11:28:14 +0200 |
commit | f6242f0e4621650a2bc409278b0442d775b14db8 (patch) | |
tree | 0d09e71f64f361cb6cc52d6cc658c585813f3a35 /src | |
parent | d90b333363b157d8eab9205430c83dab986ff965 (diff) |
HLL memory usage notes
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/third_party/src/hll/hll.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/third_party/src/hll/hll.c b/src/lib/third_party/src/hll/hll.c index f8cd817db..b9d61f21c 100644 --- a/src/lib/third_party/src/hll/hll.c +++ b/src/lib/third_party/src/hll/hll.c @@ -47,6 +47,26 @@ static __inline u_int8_t _hll_rank(u_int32_t hash, u_int8_t bits) { return i; } +/* + IMPORTANT: memory usage notes + + [i: 4] 16 bytes + [i: 5] 32 bytes + [i: 6] 64 bytes + [i: 7] 128 bytes + [i: 8] 256 bytes + [i: 9] 512 bytes + [i: 10] 1024 bytes + [i: 11] 2048 bytes + [i: 12] 4096 bytes + [i: 13] 8192 bytes + [i: 14] 16384 bytes + [i: 15] 32768 bytes + [i: 16] 65536 bytes + [i: 17] 131072 bytes + [i: 18] 262144 bytes + [i: 19] 524288 bytes +*/ int hll_init(struct ndpi_hll *hll, u_int8_t bits) { if(bits < 4 || bits > 20) { errno = ERANGE; |