From a8ef963ed7405f0770016b3bb532cda7a95f5491 Mon Sep 17 00:00:00 2001 From: Matthew Parkinson Date: Wed, 24 Nov 2021 14:34:07 +0000 Subject: [PATCH] Small comment --- src/mem/localalloc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mem/localalloc.h b/src/mem/localalloc.h index 21886ba..4568f28 100644 --- a/src/mem/localalloc.h +++ b/src/mem/localalloc.h @@ -338,6 +338,11 @@ namespace snmalloc public: constexpr LocalAllocator() = default; + /** + * Remove copy constructors and assignment operators. + * Once initialised the CoreAlloc will take references to the internals + * of this allocators, and thus copying/moving it is very unsound. + */ LocalAllocator(const LocalAllocator&) = delete; LocalAllocator& operator=(const LocalAllocator&) = delete;