From: Xenofon Foukas Date: Thu, 15 Feb 2024 15:21:42 +0000 (+0000) Subject: Add support for custom memory allocators for rculfhash X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=ac7352545826996e3866c599e4a8eff05fb662ca;hp=ac7352545826996e3866c599e4a8eff05fb662ca;p=urcu.git Add support for custom memory allocators for rculfhash The current implementation of rculfhash relies on calloc() to allocate memory for its buckets. This can in some cases lead to latency spikes when accessing the hash table, which can be avoided by using an optimized custom memory allocator. However, there is currently no way of replacing the default allocator with a custom one. This commit allows custom allocators to be used during the table initialization. The default behavior of the hash table remains unaffected, by using the stdlib calloc() and free(), if no custom allocator is given. Signed-off-by: Xenofon Foukas Signed-off-by: Mathieu Desnoyers Change-Id: Id9a405e5dc42e5564ff8623394c86056a4d1ff48 ---