From 46cd715bbfaa376bc983cba7e55032b3cae7823b Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 3 Nov 2021 12:28:12 +0000 Subject: [PATCH] explain a bit what we are trying to do here --- iarray.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iarray.h b/iarray.h index d697b09..c6f4d93 100644 --- a/iarray.h +++ b/iarray.h @@ -7,6 +7,13 @@ * - the elements are small (many fit on one page), * - the platform has an atomic compare-and-swap instruction * - the compiler supports it via __sync_val_compare_and_swap + * + * Implementation parameters: + * - once an element is allocated, it stays allocated and at the same place + * - there is no deleting elements or moving elements around + * - we are not coordinating access to elements, only providing pointers to them + * - new elements are allocated upwards, not arbitrarily (like file descriptors on Unix) + * - meant for long-running processes, destruction is provided only as an afterthought for completeness */ #include