diff options
Diffstat (limited to 'pk.h.in')
| -rw-r--r-- | pk.h.in | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -75,20 +75,19 @@ ******************************************************************************** * pkmem.h: def PK_IMPL_MEM before including pk.h to enable ad-hoc. * -* A bucketed memory manager. Allows for the creation and management of up to a -* well-defined number of buckets. +* A bucketed memory manager. Allows for the creation of ad-hoc 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 +* Note: Each created pk_membucket MUST call pk_bucket_destroy(bkt). Memory +* buckets are client managed. +* +* Thread safety: "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) +* PK_MEM_DEFAULT_BUCKET_SIZE 256MB (client-convenience only) * PK_MINIMUM_ALIGNMENT 1 -* PK_MAXIMUM_ALIGNMENT 64 -* PK_MAX_BUCKET_COUNT 8 * * For debugging purposes, define the following: * PK_MEMORY_DEBUGGER : enables a tracking system for all allocs and frees to |
