From 31275f4cee6f0593fc39fecef04477d4a26e8df4 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Fri, 22 Nov 2024 14:32:51 -0500 Subject: pkmem.h: test for expected assert failures --- pk.h.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'pk.h.in') diff --git a/pk.h.in b/pk.h.in index 0115872..e3af304 100644 --- a/pk.h.in +++ b/pk.h.in @@ -52,9 +52,14 @@ ******************************************************************************** * pkmem.h: def PK_IMPL_MEM before including pk.h to enable ad-hoc. * -* A bucketed memory manager. Allows the creation and management of up to a well -* known number of buckets. While this is thread-safe, the threading safety is -* a Grug implementation via a single mutex. PRs welcome. +* A bucketed memory manager. Allows for the creation and management of up to a +* well-defined number of buckets. +* +* Thread safety: Bucket creation and destruction is *not* thread-safe. On the +* other hand, the "pk_new" and "pk_delete" methods *are* thread-safe, but +* thread-safety is implemented per-bucket via a single mutex with long-running +* lock times. PRs for a more performant thread-safe strategy are welcome, +* complexity and benchmark depending. * * The following definitions (shown with defaults) can be overridden: * PK_DEFAULT_BUCKET_SIZE 256MB (used when bkt is NULL on first call) -- cgit v1.2.3