wf icon indicating copy to clipboard operation
wf copied to clipboard

Adding rule with more than 102 conditions: allocation error

Open gianni4sec opened this issue 2 years ago • 0 comments

I'm trying to create a rule with 1000 conditions but I'm getting an error from the allocation in the arena implementation since the memory required by the 1000 conditions is bigger than the slabSize (40000 vs 4096). I'm currently getting a panic from here when calling AddRule with 1000 conditions: https://github.com/inetaf/wf/blob/36129f591884d49e0132e70ff89d55cf05371409/malloc.go#L40-L43

I can contribute a pr for this but I was wondering what would be the best approach to solve my issue. Increase the slabSize? Make the slabSize customizable? Change Alloc to allow for allocating multiple slabs? Please let me know.

gianni4sec avatar Sep 12 '23 12:09 gianni4sec