From b5e1d11d2e95241213bc3d5792f71e8405c62451 Mon Sep 17 00:00:00 2001 From: Stefan Hanreich Date: Wed, 15 Sep 2021 23:44:27 +0200 Subject: [PATCH] doc: improve documentation for reference_counting --- doc/decisions/reference_counting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/decisions/reference_counting.md b/doc/decisions/reference_counting.md index c8706cc4e9e..1e31d8b9808 100644 --- a/doc/decisions/reference_counting.md +++ b/doc/decisions/reference_counting.md @@ -21,14 +21,14 @@ - add second reference counter to Key - One counter is for locking references, the other one for general references. A locking reference automatically locks/unlocks the keyname. - introduce reference counter for KeySets (for external keyset references) -- `keyIncRef` (or equivalent) return error in case of reference counter overflow +- `keyBorrow` returns an error in case of reference counter overflow - use fixed sized types for reference counters - increment/decrement references before/after passing instances to plugins ## Rationale -- Adding a second reference counter to Key and reducing the size of both significantly - actually saves memory compared to the previous solution. +- Adding a second reference counter to Key and reducing the size of both significantly (`size_t` to `uint16_t`) + actually saves memory (32 vs 64bit on 64-bit machines) compared to the previous solution. - The added complexity of maintaining two reference counters is worth the tradeoff for the gained functionality.