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;