diff --git a/docs/Doxyfile b/docs/Doxyfile index 70858a7cc0..0d7f5be0d9 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -290,10 +290,11 @@ TAB_SIZE = 4 # @} or use a double escape (\\{ and \\}) ALIASES = "effects=\par Effects:^^" \ + "returns=\par Returns:^^" \ "notes=\par Notes:^^" \ + "throws=\par Throws:^^" \ "requires=\par Requires:^^" \ "requiredbe=\par Required Behavior:^^" \ - "concept{2}=\2" \ "defaultbe=\par Default Behavior:^^" # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources @@ -2443,7 +2444,18 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = __cplusplus "HAL_ENUM(name)=enum name : int32_t" +PREDEFINED = __cplusplus \ + "HAL_ENUM(name)=enum name : int32_t" \ + DOXYGEN \ + WPI_NOEXCEPT:=noexcept \ + WPI_SFINAE(x):= \ + WPI_REQUIRES(x):= \ + WPI_REQUIRES_RET(...):= \ + WPI_ENABLE_IF(...):= \ + WPI_CONSTEXPR:=constexpr \ + WPI_CONSTEXPR_FNC:=constexpr \ + WPI_IMPL_DEFINED(...):=implementation_defined \ + WPI_EBO(...):= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2452,7 +2464,7 @@ PREDEFINED = __cplusplus "HAL_ENUM(name)=enum name : int32_t" # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = WPI_ALIAS_TEMPLATE # If the SKIP_FUNCTION_MACROS tag is set to YES then Doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have diff --git a/docs/build.gradle b/docs/build.gradle index 8e806a9ceb..526bae0c7b 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -144,9 +144,6 @@ doxygen { exclude 'units/**' } - //TODO: building memory docs causes search to break - exclude 'wpi/memory/**' - exclude '*.pb.h' // Save space by excluding protobuf and eigen diff --git a/docs/theme.css b/docs/theme.css index 118d032a7e..01e7dd6425 100644 --- a/docs/theme.css +++ b/docs/theme.css @@ -2799,4 +2799,4 @@ SOFTWARE. left: var(--spacing-medium) !important; right: auto; } -} \ No newline at end of file +} diff --git a/upstream_utils/memory_patches/0001-Group-doxygen-into-memory-module.patch b/upstream_utils/memory_patches/0001-Group-doxygen-into-memory-module.patch new file mode 100644 index 0000000000..8218faf96c --- /dev/null +++ b/upstream_utils/memory_patches/0001-Group-doxygen-into-memory-module.patch @@ -0,0 +1,1391 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ryan Blue +Date: Wed, 21 Aug 2024 20:50:15 -0400 +Subject: [PATCH 1/2] Group doxygen into memory module + +--- + .../foonathan/memory/aligned_allocator.hpp | 2 +- + .../foonathan/memory/allocator_storage.hpp | 22 ++++++++--------- + include/foonathan/memory/allocator_traits.hpp | 12 +++++----- + include/foonathan/memory/config.hpp | 24 +++++++++---------- + include/foonathan/memory/container.hpp | 6 ++--- + include/foonathan/memory/debugging.hpp | 20 ++++++++-------- + .../foonathan/memory/default_allocator.hpp | 2 +- + include/foonathan/memory/deleter.hpp | 12 +++++----- + include/foonathan/memory/error.hpp | 14 +++++------ + .../foonathan/memory/fallback_allocator.hpp | 2 +- + include/foonathan/memory/heap_allocator.hpp | 6 ++--- + .../foonathan/memory/iteration_allocator.hpp | 8 +++---- + include/foonathan/memory/joint_allocator.hpp | 20 ++++++++-------- + include/foonathan/memory/malloc_allocator.hpp | 2 +- + include/foonathan/memory/memory_arena.hpp | 18 +++++++------- + include/foonathan/memory/memory_pool.hpp | 6 ++--- + .../memory/memory_pool_collection.hpp | 12 +++++----- + include/foonathan/memory/memory_pool_type.hpp | 6 ++--- + .../memory/memory_resource_adapter.hpp | 8 +++---- + include/foonathan/memory/memory_stack.hpp | 8 +++---- + include/foonathan/memory/namespace_alias.hpp | 15 ++++++++---- + include/foonathan/memory/new_allocator.hpp | 2 +- + include/foonathan/memory/segregator.hpp | 8 +++---- + include/foonathan/memory/smart_ptr.hpp | 14 +++++------ + include/foonathan/memory/static_allocator.hpp | 6 ++--- + include/foonathan/memory/std_allocator.hpp | 6 ++--- + .../foonathan/memory/temporary_allocator.hpp | 6 ++--- + include/foonathan/memory/threading.hpp | 4 ++-- + include/foonathan/memory/tracking.hpp | 8 +++---- + include/foonathan/memory/virtual_memory.hpp | 16 ++++++------- + 30 files changed, 150 insertions(+), 145 deletions(-) + +diff --git a/include/foonathan/memory/aligned_allocator.hpp b/include/foonathan/memory/aligned_allocator.hpp +index fe724aa9c7ce11c6b3078605728ec1ea3d07c1fe..5ca3f29b20575a36ef11327bb1219cb4013fc5e4 100644 +--- a/include/foonathan/memory/aligned_allocator.hpp ++++ b/include/foonathan/memory/aligned_allocator.hpp +@@ -20,7 +20,7 @@ namespace foonathan + { + /// A \concept{concept_rawallocator,RawAllocator} adapter that ensures a minimum alignment. + /// It adjusts the alignment value so that it is always larger than the minimum and forwards to the specified allocator. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class aligned_allocator : FOONATHAN_EBO(allocator_traits::allocator_type) + { +diff --git a/include/foonathan/memory/allocator_storage.hpp b/include/foonathan/memory/allocator_storage.hpp +index 57f128ab0a79ea53b5bd7bd11d72de7c97dcfd4c..11747a5b15c500243764094dba3163cc9e014390 100644 +--- a/include/foonathan/memory/allocator_storage.hpp ++++ b/include/foonathan/memory/allocator_storage.hpp +@@ -88,7 +88,7 @@ namespace foonathan + /// A \concept{concept_rawallocator,RawAllocator} that stores another allocator. + /// The \concept{concept_storagepolicy,StoragePolicy} defines the allocator type being stored and how it is stored. + /// The \c Mutex controls synchronization of the access. +- /// \ingroup storage ++ /// \ingroup memory_storage + template + class allocator_storage + : FOONATHAN_EBO(StoragePolicy, +@@ -317,14 +317,14 @@ namespace foonathan + + /// Tag type that enables type-erasure in \ref reference_storage. + /// It can be used everywhere a \ref allocator_reference is used internally. +- /// \ingroup storage ++ /// \ingroup memory_storage + struct any_allocator + { + }; + + /// A \concept{concept_storagepolicy,StoragePolicy} that stores the allocator directly. + /// It embeds the allocator inside it, i.e. moving the storage policy will move the allocator. +- /// \ingroup storage ++ /// \ingroup memory_storage + template + class direct_storage : FOONATHAN_EBO(allocator_traits::allocator_type) + { +@@ -381,7 +381,7 @@ namespace foonathan + /// An alias template for \ref allocator_storage using the \ref direct_storage policy without a mutex. + /// It has the effect of giving any \concept{concept_rawallocator,RawAllocator} the interface with all member functions, + /// avoiding the need to wrap it inside the \ref allocator_traits. +- /// \ingroup storage ++ /// \ingroup memory_storage + template + FOONATHAN_ALIAS_TEMPLATE(allocator_adapter, + allocator_storage, no_mutex>); +@@ -399,7 +399,7 @@ namespace foonathan + /// It has a similar effect as \ref allocator_adapter but performs synchronization. + /// The \c Mutex will default to \c std::mutex if threading is supported, + /// otherwise there is no default. +-/// \ingroup storage ++/// \ingroup memory_storage + #if FOONATHAN_HOSTED_IMPLEMENTATION + template + FOONATHAN_ALIAS_TEMPLATE(thread_safe_allocator, +@@ -528,7 +528,7 @@ namespace foonathan + /// Specialize it for your own types, if they provide sharing semantics and can be copied. + /// They also must provide an `operator==` to check whether two allocators refer to the same shared one. + /// \note This makes no guarantees about the lifetime of the shared object, the sharing allocators can either own or refer to a shared object. +- /// \ingroup storage ++ /// \ingroup memory_storage + template + struct is_shared_allocator : std::false_type + { +@@ -540,7 +540,7 @@ namespace foonathan + /// For allocators that are already shared (determined through \ref is_shared_allocator) it will store the allocator type directly. + /// \note It does not take ownership over the allocator in the stateful case, the user has to ensure that the allocator object stays valid. + /// In the other cases the lifetime does not matter. +- /// \ingroup storage ++ /// \ingroup memory_storage + template + class reference_storage + #ifndef DOXYGEN +@@ -611,7 +611,7 @@ namespace foonathan + /// Specialization of the class template \ref reference_storage that is type-erased. + /// It is triggered by the tag type \ref any_allocator. + /// The specialization can store a reference to any allocator type. +- /// \ingroup storage ++ /// \ingroup memory_storage + template <> + class reference_storage + { +@@ -894,7 +894,7 @@ namespace foonathan + /// An alias template for \ref allocator_storage using the \ref reference_storage policy. + /// It will store a reference to the given allocator type. The tag type \ref any_allocator enables type-erasure. + /// Wrap the allocator in a \ref thread_safe_allocator if you want thread safety. +- /// \ingroup storage ++ /// \ingroup memory_storage + template + FOONATHAN_ALIAS_TEMPLATE(allocator_reference, + allocator_storage, no_mutex>); +@@ -909,14 +909,14 @@ namespace foonathan + } + + /// An alias for the \ref reference_storage specialization using type-erasure. +- /// \ingroup storage ++ /// \ingroup memory_storage + using any_reference_storage = reference_storage; + + /// An alias for \ref allocator_storage using the \ref any_reference_storage. + /// It will store a reference to any \concept{concept_rawallocator,RawAllocator}. + /// This is the same as passing the tag type \ref any_allocator to the alias \ref allocator_reference. + /// Wrap the allocator in a \ref thread_safe_allocator if you want thread safety. +- /// \ingroup storage ++ /// \ingroup memory_storage + using any_allocator_reference = allocator_storage; + + /// \returns A new \ref any_allocator_reference object by forwarding the allocator to the constructor. +diff --git a/include/foonathan/memory/allocator_traits.hpp b/include/foonathan/memory/allocator_traits.hpp +index 78f5ccf0669ae5a1fdc1ee0a868291a68b97ccd9..03b7ecdebc3511a07a1305b3101f28a6e304abc3 100644 +--- a/include/foonathan/memory/allocator_traits.hpp ++++ b/include/foonathan/memory/allocator_traits.hpp +@@ -54,7 +54,7 @@ namespace foonathan + /// It checks the existence of a custom \c construct(), \c destroy() function, if provided, + /// it cannot be used since it would not be called.
+ /// Specialize it for custom \c Allocator types to override this check. +- /// \ingroup core ++ /// \ingroup memory_core + template + struct allocator_is_raw_allocator + : FOONATHAN_EBO(detail::check_standard_allocator::valid) +@@ -62,7 +62,7 @@ namespace foonathan + }; + + /// Specialization of \ref allocator_is_raw_allocator that allows \c std::allocator again. +- /// \ingroup core ++ /// \ingroup memory_core + template + struct allocator_is_raw_allocator> : std::true_type + { +@@ -286,7 +286,7 @@ namespace foonathan + /// The default specialization of the allocator_traits for a \concept{concept_rawallocator,RawAllocator}. + /// See the last link for the requirements on types that do not specialize this class and the interface documentation. + /// Any specialization must provide the same interface. +- /// \ingroup core ++ /// \ingroup memory_core + template + class allocator_traits + { +@@ -410,7 +410,7 @@ namespace foonathan + + /// Traits that check whether a type models concept \concept{concept_rawallocator,RawAllocator}.
+ /// It must either provide the necessary functions for the default traits specialization or has specialized it. +- /// \ingroup core ++ /// \ingroup memory_core + template + struct is_raw_allocator + : detail::is_raw_allocator + class composable_allocator_traits + { +@@ -588,7 +588,7 @@ namespace foonathan + + /// Traits that check whether a type models concept \concept{concept_rawallocator,ComposableAllocator}.
+ /// It must be a \concept{concept_rawallocator,RawAllocator} and either provide the necessary functions for the default traits specialization or has specialized it. +- /// \ingroup core ++ /// \ingroup memory_core + template + struct is_composable_allocator + : detail::is_composable_allocatorfoonathan::memory. + /// If \c false, a namespace alias namespace memory = foonathan::memory is automatically inserted into each header, + /// allowing to qualify everything with foonathan::. + /// \note This option breaks in combination with using using namespace foonathan;. +-/// \ingroup core ++/// \ingroup memory_core + #define FOONATHAN_MEMORY_NAMESPACE_PREFIX 1 + + /// The mode of the automatic \ref foonathan::memory::temporary_stack creation. +@@ -140,7 +140,7 @@ + /// requires managing it through the \ref foonathan::memory::temporary_stack_initializer. + /// Set to `0` to disable the per-thread stack completely. + /// \ref foonathan::memory::get_temporary_stack() will abort the program upon call. +-/// \ingroup allocator ++/// \ingroup memory_allocator + #define FOONATHAN_MEMORY_TEMPORARY_STACK_MODE 2 + #endif + +diff --git a/include/foonathan/memory/container.hpp b/include/foonathan/memory/container.hpp +index 5c77ddb4bd6a377dbcced4de781a772a7a2e6ff4..c954ca5deece3f4430fb934642b60e2e4550deff 100644 +--- a/include/foonathan/memory/container.hpp ++++ b/include/foonathan/memory/container.hpp +@@ -36,7 +36,7 @@ namespace foonathan + { + namespace memory + { +- /// \ingroup adapter ++ /// \ingroup memory_adapter + /// @{ + + /// Alias template for an STL container that uses a certain +@@ -213,7 +213,7 @@ namespace foonathan + /// @{ + /// Convenience function to create a container adapter using a certain + /// \concept{concept_rawallocator,RawAllocator}. \returns An empty adapter with an +- /// implementation container using a reference to a given allocator. \ingroup adapter ++ /// implementation container using a reference to a given allocator. \ingroup memory_adapter + template > + std::stack make_stack(RawAllocator& allocator) + { +@@ -271,7 +271,7 @@ namespace foonathan + #endif + + #else +- /// \ingroup adapter ++ /// \ingroup memory_adapter + /// @{ + + /// Contains the node size of a node based STL container with a specific type. +diff --git a/include/foonathan/memory/debugging.hpp b/include/foonathan/memory/debugging.hpp +index bb9af985ea32f3c6a2d55eb41d19eb7e9ae418e2..20f5e0a9625e25dbd704634a5b34034f88106117 100644 +--- a/include/foonathan/memory/debugging.hpp ++++ b/include/foonathan/memory/debugging.hpp +@@ -18,7 +18,7 @@ namespace foonathan + /// The magic values that are used for debug filling. + /// If \ref FOONATHAN_MEMORY_DEBUG_FILL is \c true, memory will be filled to help detect use-after-free or missing initialization errors. + /// These are the constants for the different types. +- /// \ingroup core ++ /// \ingroup memory_core + enum class debug_magic : unsigned char + { + /// Marks internal memory used by the allocator - "allocated block". +@@ -47,19 +47,19 @@ namespace foonathan + /// It must not throw any exceptions since it is called in the cleanup process. + /// \defaultbe On a hosted implementation it logs the leak to \c stderr and returns, continuing execution. + /// On a freestanding implementation it does nothing. +- /// \ingroup core ++ /// \ingroup memory_core + using leak_handler = void (*)(const allocator_info& info, std::ptrdiff_t amount); + + /// Exchanges the \ref leak_handler. + /// \effects Sets \c h as the new \ref leak_handler in an atomic operation. + /// A \c nullptr sets the default \ref leak_handler. + /// \returns The previous \ref leak_handler. This is never \c nullptr. +- /// \ingroup core ++ /// \ingroup memory_core + leak_handler set_leak_handler(leak_handler h); + + /// Returns the \ref leak_handler. + /// \returns The current \ref leak_handler. This is never \c nullptr. +- /// \ingroup core ++ /// \ingroup memory_core + leak_handler get_leak_handler(); + + /// The type of the handler called when an invalid pointer is passed to a deallocation function. +@@ -69,19 +69,19 @@ namespace foonathan + /// It must not throw any exceptions since it might be called in the cleanup process. + /// \defaultbe On a hosted implementation it logs the information to \c stderr and calls \c std::abort(). + /// On a freestanding implementation it only calls \c std::abort(). +- /// \ingroup core ++ /// \ingroup memory_core + using invalid_pointer_handler = void (*)(const allocator_info& info, const void* ptr); + + /// Exchanges the \ref invalid_pointer_handler. + /// \effects Sets \c h as the new \ref invalid_pointer_handler in an atomic operation. + /// A \c nullptr sets the default \ref invalid_pointer_handler. + /// \returns The previous \ref invalid_pointer_handler. This is never \c nullptr. +- /// \ingroup core ++ /// \ingroup memory_core + invalid_pointer_handler set_invalid_pointer_handler(invalid_pointer_handler h); + + /// Returns the \ref invalid_pointer_handler. + /// \returns The current \ref invalid_pointer_handler. This is never \c nullptr. +- /// \ingroup core ++ /// \ingroup memory_core + invalid_pointer_handler get_invalid_pointer_handler(); + + /// The type of the handler called when a buffer under/overflow is detected. +@@ -92,7 +92,7 @@ namespace foonathan + /// It must not throw any exceptions since it me be called in the cleanup process. + /// \defaultbe On a hosted implementation it logs the information to \c stderr and calls \c std::abort(). + /// On a freestanding implementation it only calls \c std::abort(). +- /// \ingroup core ++ /// \ingroup memory_core + using buffer_overflow_handler = void (*)(const void* memory, std::size_t size, + const void* write_ptr); + +@@ -100,12 +100,12 @@ namespace foonathan + /// \effects Sets \c h as the new \ref buffer_overflow_handler in an atomic operation. + /// A \c nullptr sets the default \ref buffer_overflow_handler. + /// \returns The previous \ref buffer_overflow_handler. This is never \c nullptr. +- /// \ingroup core ++ /// \ingroup memory_core + buffer_overflow_handler set_buffer_overflow_handler(buffer_overflow_handler h); + + /// Returns the \ref buffer_overflow_handler. + /// \returns The current \ref buffer_overflow_handler. This is never \c nullptr. +- /// \ingroup core ++ /// \ingroup memory_core + buffer_overflow_handler get_buffer_overflow_handler(); + } // namespace memory + } // namespace foonathan +diff --git a/include/foonathan/memory/default_allocator.hpp b/include/foonathan/memory/default_allocator.hpp +index 29a2139439966d7b65c2bcb45b91c0a37a4b6cec..8466bc3a6ecac6cc1ef7c95cb78206b2e56dbf57 100644 +--- a/include/foonathan/memory/default_allocator.hpp ++++ b/include/foonathan/memory/default_allocator.hpp +@@ -28,7 +28,7 @@ namespace foonathan + /// \requiredbe Its type can be changed via the CMake option \c FOONATHAN_MEMORY_DEFAULT_ALLCOATOR, + /// but it must be one of the following: \ref heap_allocator, \ref new_allocator, \ref malloc_allocator, \ref static_allocator, \ref virtual_memory_allocator. + /// \defaultbe The default is \ref heap_allocator. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + using default_allocator = FOONATHAN_IMPL_DEFINED(FOONATHAN_MEMORY_IMPL_DEFAULT_ALLOCATOR); + } // namespace memory + } // namespace foonathan +diff --git a/include/foonathan/memory/deleter.hpp b/include/foonathan/memory/deleter.hpp +index 6c9cf5fb96401f9bdea930fe4cfc1deae83db205..fe3ce220dc751ed86b2f4822693f4524f53d47d1 100644 +--- a/include/foonathan/memory/deleter.hpp ++++ b/include/foonathan/memory/deleter.hpp +@@ -20,7 +20,7 @@ namespace foonathan + /// A deleter class that deallocates the memory through a specified \concept{concept_rawallocator,RawAllocator}. + /// + /// It deallocates memory for a specified type but does not call its destructors. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class allocator_deallocator : FOONATHAN_EBO(allocator_reference) + { +@@ -63,7 +63,7 @@ namespace foonathan + + /// Specialization of \ref allocator_deallocator for array types. + /// Otherwise the same behavior. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class allocator_deallocator + : FOONATHAN_EBO(allocator_reference) +@@ -119,7 +119,7 @@ namespace foonathan + /// A deleter class that deallocates the memory of a derived type through a specified \concept{concept_rawallocator,RawAllocator}. + /// + /// It can only be created from a \ref allocator_deallocator and thus must only be used for smart pointers initialized by derived-to-base conversion of the pointer. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class allocator_polymorphic_deallocator : FOONATHAN_EBO(allocator_reference) + { +@@ -159,7 +159,7 @@ namespace foonathan + + /// Similar to \ref allocator_deallocator but calls the destructors of the object. + /// Otherwise behaves the same. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class allocator_deleter : FOONATHAN_EBO(allocator_reference) + { +@@ -203,7 +203,7 @@ namespace foonathan + + /// Specialization of \ref allocator_deleter for array types. + /// Otherwise the same behavior. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class allocator_deleter + : FOONATHAN_EBO(allocator_reference) +@@ -260,7 +260,7 @@ namespace foonathan + /// Similar to \ref allocator_polymorphic_deallocator but calls the destructors of the object. + /// Otherwise behaves the same. + /// \note It has a relatively high space overhead, so only use it if you have to. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class allocator_polymorphic_deleter : FOONATHAN_EBO(allocator_reference) + { +diff --git a/include/foonathan/memory/error.hpp b/include/foonathan/memory/error.hpp +index d3152dc7aea8f2e1e48e652f1510fa02b10634f0..df6fa8ee4ee8f2576d5ee9c52e5677b3ac4cd59b 100644 +--- a/include/foonathan/memory/error.hpp ++++ b/include/foonathan/memory/error.hpp +@@ -18,7 +18,7 @@ namespace foonathan + { + /// Contains information about an allocator. + /// It can be used for logging in the various handler functions. +- /// \ingroup core ++ /// \ingroup memory_core + struct allocator_info + { + /// The name of the allocator. +@@ -60,7 +60,7 @@ namespace foonathan + /// It is derived from \c std::bad_alloc. + /// This can happen if a low level allocation function like \c std::malloc() runs out of memory. + /// Throwing can be prohibited by the handler function. +- /// \ingroup core ++ /// \ingroup memory_core + class out_of_memory : public std::bad_alloc + { + public: +@@ -116,7 +116,7 @@ namespace foonathan + /// thrown when a low-level allocator with a fixed size runs out of memory. + /// For example, thrown by \ref fixed_block_allocator or \ref static_allocator.
+ /// It is derived from \ref out_of_memory but does not provide its own handler. +- /// \ingroup core ++ /// \ingroup memory_core + class out_of_fixed_memory : public out_of_memory + { + public: +@@ -142,7 +142,7 @@ namespace foonathan + /// since it always depends on fence memory, alignment buffer and the like. + /// \note A user should only \c catch for \c bad_allocation_size, not the derived classes. + /// \note Most checks will only be done if \ref FOONATHAN_MEMORY_CHECK_ALLOCATION_SIZE is \c true. +- /// \ingroup core ++ /// \ingroup memory_core + class bad_allocation_size : public std::bad_alloc + { + public: +@@ -206,7 +206,7 @@ namespace foonathan + /// The exception class thrown when the node size exceeds the supported maximum, + /// i.e. it is bigger than \c max_node_size(). + /// It is derived from \ref bad_allocation_size but does not override the handler. +- /// \ingroup core ++ /// \ingroup memory_core + class bad_node_size : public bad_allocation_size + { + public: +@@ -224,7 +224,7 @@ namespace foonathan + /// The exception class thrown when the array size exceeds the supported maximum, + /// i.e. it is bigger than \c max_array_size(). + /// It is derived from \ref bad_allocation_size but does not override the handler. +- /// \ingroup core ++ /// \ingroup memory_core + class bad_array_size : public bad_allocation_size + { + public: +@@ -242,7 +242,7 @@ namespace foonathan + /// The exception class thrown when the alignment exceeds the supported maximum, + /// i.e. it is bigger than \c max_alignment(). + /// It is derived from \ref bad_allocation_size but does not override the handler. +- /// \ingroup core ++ /// \ingroup memory_core + class bad_alignment : public bad_allocation_size + { + public: +diff --git a/include/foonathan/memory/fallback_allocator.hpp b/include/foonathan/memory/fallback_allocator.hpp +index 7ae86eaa79b9f1d85002de767e27d9f75eee3343..b4157062d42060be4fe649fe1e84af5aec0567cf 100644 +--- a/include/foonathan/memory/fallback_allocator.hpp ++++ b/include/foonathan/memory/fallback_allocator.hpp +@@ -21,7 +21,7 @@ namespace foonathan + /// it uses `Fallback`. + /// \requires `Default` must be a composable \concept{concept_rawallocator,RawAllocator}, + /// `Fallback` must be a \concept{concept_rawallocator,RawAllocator}. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class fallback_allocator + : FOONATHAN_EBO(detail::ebo_storage<0, typename allocator_traits::allocator_type>), +diff --git a/include/foonathan/memory/heap_allocator.hpp b/include/foonathan/memory/heap_allocator.hpp +index 87532c45c8f608042a7c7536eb4ff8d0e0ae6d08..ed8f2fb9af2d593fde141b3bdb8b17e8074f8c9c 100644 +--- a/include/foonathan/memory/heap_allocator.hpp ++++ b/include/foonathan/memory/heap_allocator.hpp +@@ -28,7 +28,7 @@ namespace foonathan + /// It shall return a \c nullptr if no memory is available. + /// It must be thread safe. + /// \defaultbe On a hosted implementation this function uses OS specific facilities, \c std::malloc is used as fallback. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + void* heap_alloc(std::size_t size) noexcept; + + /// Deallocates heap memory. +@@ -39,7 +39,7 @@ namespace foonathan + /// The pointer will not be zero. + /// It must be thread safe. + /// \defaultbe On a hosted implementation this function uses OS specific facilities, \c std::free is used as fallback. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + void heap_dealloc(void* ptr, std::size_t size) noexcept; + + namespace detail +@@ -68,7 +68,7 @@ namespace foonathan + /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory from the heap. + /// It uses the two functions \ref heap_alloc and \ref heap_dealloc for the allocation, + /// which default to \c std::malloc and \c std::free. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + using heap_allocator = + FOONATHAN_IMPL_DEFINED(detail::lowlevel_allocator); + +diff --git a/include/foonathan/memory/iteration_allocator.hpp b/include/foonathan/memory/iteration_allocator.hpp +index 37cb4cc3531ad70a024c30c0457273ff42d37e3d..fdfcfa0f80d9fe5b4ea6fbec06420697f20b77b4 100644 +--- a/include/foonathan/memory/iteration_allocator.hpp ++++ b/include/foonathan/memory/iteration_allocator.hpp +@@ -32,7 +32,7 @@ namespace foonathan + /// effectively releasing all of its memory. + /// Any memory allocated will thus be usable for `N` iterations of the loop. + /// This type of allocator is a generalization of the double frame allocator. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class iteration_allocator + : FOONATHAN_EBO(detail::iteration_block_allocator) +@@ -187,7 +187,7 @@ namespace foonathan + }; + + /// An alias for \ref iteration_allocator for two iterations. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + FOONATHAN_ALIAS_TEMPLATE(double_frame_allocator, + iteration_allocator<2, BlockOrRawAllocator>); +@@ -199,7 +199,7 @@ namespace foonathan + /// Specialization of the \ref allocator_traits for \ref iteration_allocator. + /// \note It is not allowed to mix calls through the specialization and through the member functions, + /// i.e. \ref memory_stack::allocate() and this \c allocate_node(). +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class allocator_traits> + { +@@ -256,7 +256,7 @@ namespace foonathan + }; + + /// Specialization of the \ref composable_allocator_traits for \ref iteration_allocator classes. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class composable_allocator_traits> + { +diff --git a/include/foonathan/memory/joint_allocator.hpp b/include/foonathan/memory/joint_allocator.hpp +index 377bc81c20c532ff268360284672a4103594ed29..894ac381e82950637783ebe9f7100a95d3240da3 100644 +--- a/include/foonathan/memory/joint_allocator.hpp ++++ b/include/foonathan/memory/joint_allocator.hpp +@@ -97,7 +97,7 @@ namespace foonathan + /// Tag type that can't be created. + /// + /// It isued by \ref joint_ptr. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class joint + { + joint(std::size_t cap) noexcept : capacity(cap) {} +@@ -113,7 +113,7 @@ namespace foonathan + /// Tag type to make the joint size more explicit. + /// + /// It is used by \ref joint_ptr. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + struct joint_size + { + std::size_t size; +@@ -125,7 +125,7 @@ namespace foonathan + /// + /// This will disable default copy/move operations + /// and inserts additional members for the joint memory management. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class joint_type + { +@@ -207,7 +207,7 @@ namespace foonathan + /// + /// The memory block will be managed by the given \concept{concept_rawallocator,RawAllocator}, + /// it is stored in an \ref allocator_reference and not owned by the pointer directly. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class joint_ptr : FOONATHAN_EBO(allocator_reference) + { +@@ -450,7 +450,7 @@ namespace foonathan + /// @{ + /// \returns A new \ref joint_ptr as if created with the same arguments passed to the constructor. + /// \relatesalso joint_ptr +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + auto allocate_joint(RawAllocator& alloc, joint_size additional_size, Args&&... args) + -> joint_ptr +@@ -471,7 +471,7 @@ namespace foonathan + /// @{ + /// \returns A new \ref joint_ptr that points to a copy of `joint`. + /// It will allocate as much memory as needed and forward to the copy constructor. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + auto clone_joint(RawAllocator& alloc, const joint_type& joint) + -> joint_ptr +@@ -498,7 +498,7 @@ namespace foonathan + /// It is somewhat limited and allows only allocation once. + /// All joint allocators for an object share the joint memory and must not be used in multiple threads. + /// The memory it returns is owned by a \ref joint_ptr and will be destroyed through it. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class joint_allocator + { + public: +@@ -567,7 +567,7 @@ namespace foonathan + + /// Specialization of \ref is_shared_allocator to mark \ref joint_allocator as shared. + /// This allows using it as \ref allocator_reference directly. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template <> + struct is_shared_allocator : std::true_type + { +@@ -594,7 +594,7 @@ namespace foonathan + /// \note This is required because the container constructor will end up copying/moving the allocator. + /// But this is not allowed as you need the allocator with the correct joined memory. + /// Copying can be customized (i.e. forbidden), but sadly not move, so keep that in mind. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template <> + struct propagation_traits + { +@@ -624,7 +624,7 @@ namespace foonathan + /// + /// It has a dynamic, but fixed size, + /// it cannot grow after it has been created. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class joint_array + { +diff --git a/include/foonathan/memory/malloc_allocator.hpp b/include/foonathan/memory/malloc_allocator.hpp +index ef8a1b03fe5f767298024aa680722648caa48b82..cc3700cfe2f2339aca2808a745ae1d02b3f11ffb 100644 +--- a/include/foonathan/memory/malloc_allocator.hpp ++++ b/include/foonathan/memory/malloc_allocator.hpp +@@ -56,7 +56,7 @@ namespace foonathan + + /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using std::malloc(). + /// It throws \ref out_of_memory when the allocation fails. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + using malloc_allocator = + FOONATHAN_IMPL_DEFINED(detail::lowlevel_allocator); + +diff --git a/include/foonathan/memory/memory_arena.hpp b/include/foonathan/memory/memory_arena.hpp +index 4c277d816abd550d165e5df40161e313e543fd36..645796bece4f81fd7c84c6c039b1ee619499daff 100644 +--- a/include/foonathan/memory/memory_arena.hpp ++++ b/include/foonathan/memory/memory_arena.hpp +@@ -23,7 +23,7 @@ namespace foonathan + { + /// A memory block. + /// It is defined by its starting address and size. +- /// \ingroup core ++ /// \ingroup memory_core + struct memory_block + { + void* memory; ///< The address of the memory block (might be \c nullptr). +@@ -67,7 +67,7 @@ namespace foonathan + } // namespace detail + + /// Traits that check whether a type models concept \concept{concept_blockallocator,BlockAllocator}. +- /// \ingroup core ++ /// \ingroup memory_core + template + struct is_block_allocator : decltype(detail::is_block_allocator_impl(0)) + { +@@ -85,7 +85,7 @@ namespace foonathan + /// This can be useful, e.g. if there will never be blocks available for deallocation. + /// The (tiny) overhead for the cache can then be disabled. + /// An example is \ref memory_pool. +- /// \ingroup core ++ /// \ingroup memory_core + constexpr bool cached_arena = true; + constexpr bool uncached_arena = false; + /// @} +@@ -271,7 +271,7 @@ namespace foonathan + /// This can be disabled with the second template parameter, + /// passing it \ref uncached_arena (or \c false) disables it, + /// \ref cached_arena (or \c true) enables it explicitly. +- /// \ingroup core ++ /// \ingroup memory_core + template + class memory_arena : FOONATHAN_EBO(BlockAllocator), + FOONATHAN_EBO(detail::memory_arena_cache) +@@ -443,7 +443,7 @@ namespace foonathan + /// The size of the next memory block will grow by a given factor after each allocation, + /// allowing an amortized constant allocation time in the higher level allocator. + /// The factor can be given as rational in the template parameter, default is \c 2. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class growing_block_allocator + : FOONATHAN_EBO(allocator_traits::allocator_type) +@@ -522,7 +522,7 @@ namespace foonathan + /// A \concept{concept_blockallocator,BlockAllocator} that allows only one block allocation. + /// It can be used to prevent higher-level allocators from expanding. + /// The one block allocation is performed through the \c allocate_array() function of the given \concept{concept_rawallocator,RawAllocator}. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class fixed_block_allocator : FOONATHAN_EBO(allocator_traits::allocator_type) + { +@@ -616,7 +616,7 @@ namespace foonathan + /// Takes either a \concept{concept_blockallocator,BlockAllocator} or a \concept{concept_rawallocator,RawAllocator}. + /// In the first case simply aliases the type unchanged, in the second to \ref growing_block_allocator (or the template in `BlockAllocator`) with the \concept{concept_rawallocator,RawAllocator}. + /// Using this allows passing normal \concept{concept_rawallocator,RawAllocators} as \concept{concept_blockallocator,BlockAllocators}. +- /// \ingroup core ++ /// \ingroup memory_core + template class BlockAllocator = detail::default_block_wrapper> + using make_block_allocator_t = FOONATHAN_IMPL_DEFINED( +@@ -628,7 +628,7 @@ namespace foonathan + /// Helper function make a \concept{concept_blockallocator,BlockAllocator}. + /// \returns A \concept{concept_blockallocator,BlockAllocator} of the given type created with the given arguments. + /// \requires Same requirements as the constructor. +- /// \ingroup core ++ /// \ingroup memory_core + template + make_block_allocator_t make_block_allocator(std::size_t block_size, + Args&&... args) +@@ -654,7 +654,7 @@ namespace foonathan + { + /// Syntax sugar to express sizes with unit prefixes. + /// \returns The number of bytes `value` is in the given unit. +- /// \ingroup core ++ /// \ingroup memory_core + /// @{ + constexpr std::size_t operator"" _KiB(unsigned long long value) noexcept + { +diff --git a/include/foonathan/memory/memory_pool.hpp b/include/foonathan/memory/memory_pool.hpp +index d764365b22a498cfad37522e63c84b02f639800a..7e833a6e55ee3fb4315b693303a9252a494426f1 100644 +--- a/include/foonathan/memory/memory_pool.hpp ++++ b/include/foonathan/memory/memory_pool.hpp +@@ -42,7 +42,7 @@ namespace foonathan + /// for example in a node based container like \c std::list. + /// It is not so good for different allocation sizes and has some drawbacks for arrays + /// as described in \ref memory_pool_type.hpp. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class memory_pool + : FOONATHAN_EBO(detail::default_leak_checker) +@@ -280,7 +280,7 @@ namespace foonathan + /// Specialization of the \ref allocator_traits for \ref memory_pool classes. + /// \note It is not allowed to mix calls through the specialization and through the member functions, + /// i.e. \ref memory_pool::allocate_node() and this \c allocate_node(). +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class allocator_traits> + { +@@ -360,7 +360,7 @@ namespace foonathan + }; + + /// Specialization of the \ref composable_allocator_traits for \ref memory_pool classes. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class composable_allocator_traits> + { +diff --git a/include/foonathan/memory/memory_pool_collection.hpp b/include/foonathan/memory/memory_pool_collection.hpp +index e6952e9d8b5a10ff9ecc1d01ddf322683acefe25..5467efe6c865a49563aa877d417641e6b1c840e9 100644 +--- a/include/foonathan/memory/memory_pool_collection.hpp ++++ b/include/foonathan/memory/memory_pool_collection.hpp +@@ -34,7 +34,7 @@ namespace foonathan + /// A \c BucketDistribution for \ref memory_pool_collection defining that there is a bucket, i.e. pool, for each size. + /// That means that for each possible size up to an upper bound there will be a seperate free list. + /// Allocating a node will not waste any memory. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + struct identity_buckets + { + using type = detail::identity_access_policy; +@@ -43,7 +43,7 @@ namespace foonathan + /// A \c BucketDistribution for \ref memory_pool_collection defining that there is a bucket, i.e. pool, for each power of two. + /// That means for each power of two up to an upper bound there will be a separate free list. + /// Allocating a node will only waste half of the memory. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + struct log2_buckets + { + using type = detail::log2_access_policy; +@@ -55,7 +55,7 @@ namespace foonathan + /// Allocating a node of given size will use the appropriate free list.
+ /// This allocator is ideal for \concept{concept_node,node} allocations in any order but with a predefined set of sizes, + /// not only one size like \ref memory_pool. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class memory_pool_collection +@@ -398,7 +398,7 @@ namespace foonathan + + /// An alias for \ref memory_pool_collection using the \ref identity_buckets policy + /// and a \c PoolType defaulting to \ref node_pool. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + FOONATHAN_ALIAS_TEMPLATE(bucket_allocator, + memory_pool_collection); +@@ -409,7 +409,7 @@ namespace foonathan + /// Specialization of the \ref allocator_traits for \ref memory_pool_collection classes. + /// \note It is not allowed to mix calls through the specialization and through the member functions, + /// i.e. \ref memory_pool_collection::allocate_node() and this \c allocate_node(). +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class allocator_traits> + { +@@ -484,7 +484,7 @@ namespace foonathan + }; + + /// Specialization of the \ref composable_allocator_traits for \ref memory_pool_collection classes. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class composable_allocator_traits> + { +diff --git a/include/foonathan/memory/memory_pool_type.hpp b/include/foonathan/memory/memory_pool_type.hpp +index 714edea4104810189752efb5fe42f08422ee4f06..990c8ac2f7b8bb6f57cc532e3c65a9fd547f6cd9 100644 +--- a/include/foonathan/memory/memory_pool_type.hpp ++++ b/include/foonathan/memory/memory_pool_type.hpp +@@ -20,7 +20,7 @@ namespace foonathan + /// Tag type defining a memory pool optimized for nodes. + /// It does not support array allocations that great and may trigger a growth even if there is enough memory. + /// But it is the fastest pool type. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + struct node_pool : FOONATHAN_EBO(std::true_type) + { + using type = detail::node_free_memory_list; +@@ -31,7 +31,7 @@ namespace foonathan + /// Array allocations are still pretty slow, if the array gets big enough it can get slower than \c new. + /// Node allocations are still fast, unless there is deallocation in random order. + /// \note Use this tag type only if you really need to have a memory pool! +- /// \ingroup allocator ++ /// \ingroup memory_allocator + struct array_pool : FOONATHAN_EBO(std::true_type) + { + using type = detail::array_free_memory_list; +@@ -41,7 +41,7 @@ namespace foonathan + /// The free list is intrusive and thus requires that each node has at least the size of a pointer. + /// This tag type does not have this requirement and thus allows zero-memory-overhead allocations of small nodes. + /// It is a little bit slower than \ref node_pool and does not support arrays. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + struct small_node_pool : FOONATHAN_EBO(std::false_type) + { + using type = detail::small_free_memory_list; +diff --git a/include/foonathan/memory/memory_resource_adapter.hpp b/include/foonathan/memory/memory_resource_adapter.hpp +index 7ff48f16f71068435ea52b385f27af3a76976343..cf58eed1f0134c5236ae20be4f095bb31244a4a1 100644 +--- a/include/foonathan/memory/memory_resource_adapter.hpp ++++ b/include/foonathan/memory/memory_resource_adapter.hpp +@@ -87,11 +87,11 @@ namespace foonathan + namespace memory + { + /// The \c memory_resource abstract base class used in the implementation. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + FOONATHAN_ALIAS_TEMPLATE(memory_resource, foonathan_memory_pmr::memory_resource); + + /// Wraps a \concept{concept_rawallocator,RawAllocator} and makes it a \ref memory_resource. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class memory_resource_adapter + : public memory_resource, +@@ -163,7 +163,7 @@ namespace foonathan + }; + + /// Wraps a \ref memory_resource and makes it a \concept{concept_rawallocator,RawAllocator}. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + class memory_resource_allocator + { + public: +@@ -227,7 +227,7 @@ namespace foonathan + + /// Specialization of \ref is_shared_allocator to mark \ref memory_resource_allocator as shared. + /// This allows using it as \ref allocator_reference directly. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template <> + struct is_shared_allocator : std::true_type + { +diff --git a/include/foonathan/memory/memory_stack.hpp b/include/foonathan/memory/memory_stack.hpp +index b3dcd0f2ec40be759c93be2c58942ae6a8da639b..dc9f1226ab504546e06d471ac48bee4a1b50fcda 100644 +--- a/include/foonathan/memory/memory_stack.hpp ++++ b/include/foonathan/memory/memory_stack.hpp +@@ -97,7 +97,7 @@ namespace foonathan + /// and saves a marker to the current top. + /// Allocation simply moves this marker by the appropriate number of bytes and returns the pointer at the old marker position, + /// deallocation is not directly supported, only setting the marker to a previously queried position. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class memory_stack + : FOONATHAN_EBO(detail::default_leak_checker) +@@ -276,7 +276,7 @@ namespace foonathan + /// A `Stack` is anything that provides a `marker`, a `top()` function returning a `marker` + /// and an `unwind()` function to unwind to a `marker`, + /// like a \ref foonathan::memory::memory_stack +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template > + class memory_stack_raii_unwind + { +@@ -379,7 +379,7 @@ namespace foonathan + /// Specialization of the \ref allocator_traits for \ref memory_stack classes. + /// \note It is not allowed to mix calls through the specialization and through the member functions, + /// i.e. \ref memory_stack::allocate() and this \c allocate_node(). +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class allocator_traits> + { +@@ -441,7 +441,7 @@ namespace foonathan + }; + + /// Specialization of the \ref composable_allocator_traits for \ref memory_stack classes. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + class composable_allocator_traits> + { +diff --git a/include/foonathan/memory/namespace_alias.hpp b/include/foonathan/memory/namespace_alias.hpp +index a3e0354a7532e9c1d74c6c9dff27485d30b8d525..9a688f550d736aa8328e27c970e9018ec0869c5f 100644 +--- a/include/foonathan/memory/namespace_alias.hpp ++++ b/include/foonathan/memory/namespace_alias.hpp +@@ -7,13 +7,18 @@ + /// \file + /// Convenient namespace alias. + +-/// \defgroup core Core components ++/// \defgroup memory Memory Allocator Library ++/// @{ + +-/// \defgroup allocator Allocator implementations ++/// \defgroup memory_core Core components + +-/// \defgroup adapter Adapters and Wrappers ++/// \defgroup memory_allocator Allocator implementations + +-/// \defgroup storage Allocator storage ++/// \defgroup memory_adapter Adapters and Wrappers ++ ++/// \defgroup memory_storage Allocator storage ++ ++/// @} + + /// \namespace foonathan + /// Foonathan namespace. +@@ -32,5 +37,5 @@ namespace foonathan + } // namespace foonathan + + namespace memory = foonathan::memory; +- ++///@} + #endif // FOONATHAN_MEMORY_NAMESPACE_ALIAS_HPP_INCLUDED +diff --git a/include/foonathan/memory/new_allocator.hpp b/include/foonathan/memory/new_allocator.hpp +index 61fb5dbceff04639a8092519f0af5ec40ea2032d..5d11038ae6fce0379c7aeddd470ea1ad4744f5b7 100644 +--- a/include/foonathan/memory/new_allocator.hpp ++++ b/include/foonathan/memory/new_allocator.hpp +@@ -40,7 +40,7 @@ namespace foonathan + /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using (nothrow) operator new. + /// If the operator returns \c nullptr, it behaves like \c new and loops calling \c std::new_handler, + /// but instead of throwing a \c std::bad_alloc exception, it throws \ref out_of_memory. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + using new_allocator = + FOONATHAN_IMPL_DEFINED(detail::lowlevel_allocator); + +diff --git a/include/foonathan/memory/segregator.hpp b/include/foonathan/memory/segregator.hpp +index 80e066bf0a6178e2404ebd65332dde01a3606fab..75dad5ebbb795b91b919c2e3ac72de396a77c88e 100644 +--- a/include/foonathan/memory/segregator.hpp ++++ b/include/foonathan/memory/segregator.hpp +@@ -18,7 +18,7 @@ namespace foonathan + namespace memory + { + /// A \concept{concept_segregatable,Segregatable} that allocates until a maximum size. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class threshold_segregatable : FOONATHAN_EBO(allocator_traits::allocator_type) + { +@@ -78,7 +78,7 @@ namespace foonathan + + /// A composable \concept{concept_rawallocator,RawAllocator} that will always fail. + /// This is useful for compositioning or as last resort in \ref binary_segregator. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class null_allocator + { + public: +@@ -119,7 +119,7 @@ namespace foonathan + /// A \concept{concept_rawallocator,RawAllocator} that either uses the \concept{concept_segregatable,Segregatable} or the other `RawAllocator`. + /// It is a faster alternative to \ref fallback_allocator that doesn't require a composable allocator + /// and decides about the allocator to use purely with the `Segregatable` based on size and alignment. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class binary_segregator + : FOONATHAN_EBO( +@@ -375,7 +375,7 @@ namespace foonathan + /// the result is `binary_segregator>`. + /// \note It will result in an allocator that tries each `Segregatable` in the order specified + /// using the last parameter as final fallback. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + FOONATHAN_ALIAS_TEMPLATE(segregator, + typename detail::make_segregator_t::type); +diff --git a/include/foonathan/memory/smart_ptr.hpp b/include/foonathan/memory/smart_ptr.hpp +index 9964495583e9f024b5242d08bb03f06ddae96a3d..f8508a404e9476b449b7ed5853b0dcdd65630e2f 100644 +--- a/include/foonathan/memory/smart_ptr.hpp ++++ b/include/foonathan/memory/smart_ptr.hpp +@@ -88,7 +88,7 @@ namespace foonathan + /// A \c std::unique_ptr that deletes using a \concept{concept_rawallocator,RawAllocator}. + /// + /// It is an alias template using \ref allocator_deleter as \c Deleter class. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + FOONATHAN_ALIAS_TEMPLATE(unique_ptr, + std::unique_ptr>); +@@ -99,7 +99,7 @@ namespace foonathan + /// and is meant to be used inside containers. + /// It is an alias template using \ref allocator_polymorphic_deleter as \c Deleter class. + /// \note It has a relatively high overhead, so only use it if you have to. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + FOONATHAN_ALIAS_TEMPLATE( + unique_base_ptr, +@@ -111,7 +111,7 @@ namespace foonathan + /// \returns A \c std::unique_ptr owning that memory. + /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, + /// the caller has to ensure that the object lives as long as the smart pointer. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + auto allocate_unique(RawAllocator&& alloc, Args&&... args) -> FOONATHAN_REQUIRES_RET( + !std::is_array::value, +@@ -129,7 +129,7 @@ namespace foonathan + /// \returns A \c std::unique_ptr with a type-erased allocator reference owning that memory. + /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, + /// the caller has to ensure that the object lives as long as the smart pointer. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + auto allocate_unique(any_allocator, RawAllocator&& alloc, Args&&... args) + -> FOONATHAN_REQUIRES_RET(!std::is_array::value, +@@ -146,7 +146,7 @@ namespace foonathan + /// \returns A \c std::unique_ptr owning that array. + /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, + /// the caller has to ensure that the object lives as long as the smart pointer. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + auto allocate_unique(RawAllocator&& alloc, std::size_t size) -> FOONATHAN_REQUIRES_RET( + std::is_array::value, +@@ -164,7 +164,7 @@ namespace foonathan + /// \returns A \c std::unique_ptr with a type-erased allocator reference owning that array. + /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, + /// the caller has to ensure that the object lives as long as the smart pointer. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + auto allocate_unique(any_allocator, RawAllocator&& alloc, std::size_t size) + -> FOONATHAN_REQUIRES_RET(std::is_array::value, +@@ -183,7 +183,7 @@ namespace foonathan + /// \returns A \c std::shared_ptr created using \c std::allocate_shared. + /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the shared pointer, + /// the caller has to ensure that the object lives as long as the smart pointer. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + std::shared_ptr allocate_shared(RawAllocator&& alloc, Args&&... args) + { +diff --git a/include/foonathan/memory/static_allocator.hpp b/include/foonathan/memory/static_allocator.hpp +index 17552b439a560cb576787c94fb7ae0593a2fedd4..580fa2be8f5b1a291d1864558cb75328c4baff3f 100644 +--- a/include/foonathan/memory/static_allocator.hpp ++++ b/include/foonathan/memory/static_allocator.hpp +@@ -27,7 +27,7 @@ namespace foonathan + /// Its constructor will take a reference to it and use it for its allocation. + /// The storage type is simply a \c char array aligned for maximum alignment. + /// \note It is not allowed to access the memory of the storage. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template + struct static_allocator_storage + { +@@ -43,7 +43,7 @@ namespace foonathan + /// It works on a \ref static_allocator_storage and uses its memory for all allocations. + /// Deallocations are not supported, memory cannot be marked as freed.
+ /// \note It is not allowed to share an \ref static_allocator_storage between multiple \ref static_allocator objects. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class static_allocator + { + public: +@@ -100,7 +100,7 @@ namespace foonathan + /// It works on a \ref static_allocator_storage and uses it for all allocations, + /// deallocations are only allowed in reversed order which is guaranteed by \ref memory_arena. + /// \note It is not allowed to share an \ref static_allocator_storage between multiple \ref static_allocator objects. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class static_block_allocator + { + public: +diff --git a/include/foonathan/memory/std_allocator.hpp b/include/foonathan/memory/std_allocator.hpp +index e865915b133b1cb046d484471990c49b7bb2babe..33b2f5489b290f9cf3d3ad710373e2f982928f12 100644 +--- a/include/foonathan/memory/std_allocator.hpp ++++ b/include/foonathan/memory/std_allocator.hpp +@@ -44,7 +44,7 @@ namespace foonathan + } // namespace traits_detail + + /// Controls the propagation of a \ref std_allocator for a certain \concept{concept_rawallocator,RawAllocator}. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + struct propagation_traits + { +@@ -69,7 +69,7 @@ namespace foonathan + + /// Wraps a \concept{concept_rawallocator,RawAllocator} and makes it a "normal" \c Allocator. + /// It allows using a \c RawAllocator anywhere a \c Allocator is required. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class std_allocator : + #if defined _MSC_VER && defined __clang__ +@@ -344,7 +344,7 @@ namespace foonathan + /// An alias template for \ref std_allocator using a type-erased \concept{concept_rawallocator,RawAllocator}. + /// This is the same as using a \ref std_allocator with the tag type \ref any_allocator. + /// The implementation is optimized to call fewer virtual functions. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + FOONATHAN_ALIAS_TEMPLATE(any_std_allocator, std_allocator); + +diff --git a/include/foonathan/memory/temporary_allocator.hpp b/include/foonathan/memory/temporary_allocator.hpp +index 3b6269d7ff139a073aa5dc7cb7d27360a567871b..135d250bc15ee074a22b3c210b541dcff98e6d83 100644 +--- a/include/foonathan/memory/temporary_allocator.hpp ++++ b/include/foonathan/memory/temporary_allocator.hpp +@@ -91,7 +91,7 @@ namespace foonathan + + /// A wrapper around the \ref memory_stack that is used by the \ref temporary_allocator. + /// There should be at least one per-thread. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class temporary_stack : FOONATHAN_EBO(detail::temporary_stack_list_node) + { + public: +@@ -215,7 +215,7 @@ namespace foonathan + /// This avoids the stack overflow error and is portable, + /// with a similar speed. + /// All allocations done in the scope of the allocator object are automatically freed when the object is destroyed. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class temporary_allocator + { + public: +@@ -267,7 +267,7 @@ namespace foonathan + /// Specialization of the \ref allocator_traits for \ref temporary_allocator classes. + /// \note It is not allowed to mix calls through the specialization and through the member functions, + /// i.e. \ref temporary_allocator::allocate() and this \c allocate_node(). +- /// \ingroup allocator ++ /// \ingroup memory_allocator + template <> + class allocator_traits + { +diff --git a/include/foonathan/memory/threading.hpp b/include/foonathan/memory/threading.hpp +index 4cf507c45296a0d60847c285865473024633b0d0..52b3998b2c7b7ee5c4b0def5857ddaf6f65e8435 100644 +--- a/include/foonathan/memory/threading.hpp ++++ b/include/foonathan/memory/threading.hpp +@@ -22,7 +22,7 @@ namespace foonathan + { + /// A dummy \c Mutex class that does not lock anything. + /// It is a valid \c Mutex and can be used to disable locking anywhere a \c Mutex is requested. +- /// \ingroup core ++ /// \ingroup memory_core + struct no_mutex + { + void lock() noexcept {} +@@ -39,7 +39,7 @@ namespace foonathan + /// This allows to use \ref no_mutex as an optimization. + /// Note that stateless allocators are implictly thread-safe. + /// Specialize it only for your own stateful allocators. +- /// \ingroup core ++ /// \ingroup memory_core + template + struct is_thread_safe_allocator + : std::integral_constant::is_stateful::value> +diff --git a/include/foonathan/memory/tracking.hpp b/include/foonathan/memory/tracking.hpp +index 57fb0d1cb477d8a188a5681b59710436dc34f541..222e6105bf35d884fa4e472f077ebf58a721894a 100644 +--- a/include/foonathan/memory/tracking.hpp ++++ b/include/foonathan/memory/tracking.hpp +@@ -74,7 +74,7 @@ namespace foonathan + /// The class can then be used anywhere a \concept{concept_blockallocator,BlockAllocator} is required and the memory usage will be tracked.
+ /// It will only call the on_allocator_growth() and on_allocator_shrinking() tracking functions, + /// since a \concept{concept_blockallocator,BlockAllocator} is normally used inside higher allocators only. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class tracked_block_allocator + : FOONATHAN_EBO(Tracker, make_block_allocator_t) +@@ -154,7 +154,7 @@ namespace foonathan + /// Similar to \ref tracked_block_allocator, but shares the tracker with the higher level allocator. + /// This allows tracking both (de-)allocations and growth with one tracker. + /// \note Due to implementation reasons, it cannot track growth and shrinking in the constructor/destructor of the higher level allocator. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + using deeply_tracked_block_allocator = FOONATHAN_IMPL_DEFINED( + detail::deeply_tracked_block_allocator + /// If the \concept{concept_rawallocator,RawAllocator} uses \ref deeply_tracked_block_allocator as \concept{concept_blockallocator,BlockAllocator}, + /// it will also track growth and shrinking of the allocator. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + class tracked_allocator + : FOONATHAN_EBO(Tracker, allocator_traits::allocator_type) +@@ -406,7 +406,7 @@ namespace foonathan + /// A \ref tracked_allocator that has rebound any \concept{concept_blockallocator,BlockAllocator} to the corresponding \ref deeply_tracked_block_allocator. + /// This makes it a deeply tracked allocator.
+ /// It replaces each template argument of the given \concept{concept_rawallocator,RawAllocator} for which \ref is_block_allocator or \ref is_raw_allocator is \c true with a \ref deeply_tracked_block_allocator. +- /// \ingroup adapter ++ /// \ingroup memory_adapter + template + FOONATHAN_ALIAS_TEMPLATE( + deeply_tracked_allocator, +diff --git a/include/foonathan/memory/virtual_memory.hpp b/include/foonathan/memory/virtual_memory.hpp +index 68705e9738a166da04c159a3a8f04e7ce33d94ad..35f7ccd54fdda08c504696b0719d16ec27d6c9e9 100644 +--- a/include/foonathan/memory/virtual_memory.hpp ++++ b/include/foonathan/memory/virtual_memory.hpp +@@ -36,14 +36,14 @@ namespace foonathan + /// The page size of the virtual memory. + /// All virtual memory allocations must be multiple of this size. + /// It is usually 4KiB. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + /// \deprecated use \ref get_virtual_memory_page_size instead. + extern const std::size_t virtual_memory_page_size; + + /// \returns the page size of the virtual memory. + /// All virtual memory allocations must be multiple of this size. + /// It is usually 4KiB. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + std::size_t get_virtual_memory_page_size() noexcept; + + /// Reserves virtual memory. +@@ -52,33 +52,33 @@ namespace foonathan + /// \returns The address of the first reserved page, + /// or \c nullptr in case of error. + /// \note The memory may not be used, it must first be commited. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + void* virtual_memory_reserve(std::size_t no_pages) noexcept; + + /// Releases reserved virtual memory. + /// \effects Returns previously reserved pages to the system. + /// \requires \c pages must come from a previous call to \ref virtual_memory_reserve with the same \c calc_no_pages, + /// it must not be \c nullptr. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + void virtual_memory_release(void* pages, std::size_t no_pages) noexcept; + + /// Commits reserved virtual memory. + /// \effects Marks \c calc_no_pages pages starting at the given address available for use. + /// \returns The beginning of the committed area, i.e. \c memory, or \c nullptr in case of error. + /// \requires The memory must be previously reserved. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + void* virtual_memory_commit(void* memory, std::size_t no_pages) noexcept; + + /// Decommits commited virtual memory. + /// \effects Puts commited memory back in the reserved state. + /// \requires \c memory must come from a previous call to \ref virtual_memory_commit with the same \c calc_no_pages + /// it must not be \c nullptr. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + void virtual_memory_decommit(void* memory, std::size_t no_pages) noexcept; + + /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using the virtual memory allocation functions. + /// It does not prereserve any memory and will always reserve and commit combined. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class virtual_memory_allocator + : FOONATHAN_EBO(detail::global_leak_checker) + { +@@ -125,7 +125,7 @@ namespace foonathan + /// A \concept{concept_blockallocator,BlockAllocator} that reserves virtual memory and commits it part by part. + /// It is similar to \ref memory_stack but does not support growing and uses virtual memory, + /// also meant for big blocks not small allocations. +- /// \ingroup allocator ++ /// \ingroup memory_allocator + class virtual_block_allocator + { + public: diff --git a/upstream_utils/memory_patches/0002-Remove-conflicting-doxygen-concept-alias.patch b/upstream_utils/memory_patches/0002-Remove-conflicting-doxygen-concept-alias.patch new file mode 100644 index 0000000000..08b58bf146 --- /dev/null +++ b/upstream_utils/memory_patches/0002-Remove-conflicting-doxygen-concept-alias.patch @@ -0,0 +1,1459 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ryan Blue +Date: Wed, 21 Aug 2024 21:47:32 -0400 +Subject: [PATCH 2/2] Remove conflicting doxygen 'concept' alias + +\concept was added as a doxygen command in 1.9.2 and is meant to be applied to concepts. Inserting them into standard comment paragraphs causes doxygen to interpret the following text as a concept name and add it to the documentation, as well as remove the text from the paragraph. +In the upstream repo, this alias links to markdown documentation, so it's not usable for us anyways. +--- + .../foonathan/memory/aligned_allocator.hpp | 2 +- + .../foonathan/memory/allocator_storage.hpp | 20 +++---- + include/foonathan/memory/allocator_traits.hpp | 12 ++--- + include/foonathan/memory/container.hpp | 8 +-- + .../foonathan/memory/default_allocator.hpp | 4 +- + include/foonathan/memory/deleter.hpp | 6 +-- + .../foonathan/memory/fallback_allocator.hpp | 6 +-- + include/foonathan/memory/heap_allocator.hpp | 2 +- + .../foonathan/memory/iteration_allocator.hpp | 10 ++-- + include/foonathan/memory/joint_allocator.hpp | 8 +-- + include/foonathan/memory/malloc_allocator.hpp | 2 +- + include/foonathan/memory/memory_arena.hpp | 42 +++++++-------- + include/foonathan/memory/memory_pool.hpp | 46 ++++++++-------- + .../memory/memory_pool_collection.hpp | 52 +++++++++---------- + .../memory/memory_resource_adapter.hpp | 6 +-- + include/foonathan/memory/memory_stack.hpp | 18 +++---- + include/foonathan/memory/new_allocator.hpp | 2 +- + include/foonathan/memory/segregator.hpp | 28 +++++----- + include/foonathan/memory/smart_ptr.hpp | 16 +++--- + include/foonathan/memory/static_allocator.hpp | 10 ++-- + include/foonathan/memory/std_allocator.hpp | 10 ++-- + .../foonathan/memory/temporary_allocator.hpp | 2 +- + include/foonathan/memory/threading.hpp | 2 +- + include/foonathan/memory/tracking.hpp | 28 +++++----- + include/foonathan/memory/virtual_memory.hpp | 10 ++-- + 25 files changed, 176 insertions(+), 176 deletions(-) + +diff --git a/include/foonathan/memory/aligned_allocator.hpp b/include/foonathan/memory/aligned_allocator.hpp +index 5ca3f29b20575a36ef11327bb1219cb4013fc5e4..f9b190de4877df70c564dc5984b1f70d4fa925cf 100644 +--- a/include/foonathan/memory/aligned_allocator.hpp ++++ b/include/foonathan/memory/aligned_allocator.hpp +@@ -18,7 +18,7 @@ namespace foonathan + { + namespace memory + { +- /// A \concept{concept_rawallocator,RawAllocator} adapter that ensures a minimum alignment. ++ /// A RawAllocator adapter that ensures a minimum alignment. + /// It adjusts the alignment value so that it is always larger than the minimum and forwards to the specified allocator. + /// \ingroup memory_adapter + template +diff --git a/include/foonathan/memory/allocator_storage.hpp b/include/foonathan/memory/allocator_storage.hpp +index 11747a5b15c500243764094dba3163cc9e014390..a7931503369110298602e8919c37b34577d7b6be 100644 +--- a/include/foonathan/memory/allocator_storage.hpp ++++ b/include/foonathan/memory/allocator_storage.hpp +@@ -85,8 +85,8 @@ namespace foonathan + } + } // namespace detail + +- /// A \concept{concept_rawallocator,RawAllocator} that stores another allocator. +- /// The \concept{concept_storagepolicy,StoragePolicy} defines the allocator type being stored and how it is stored. ++ /// A RawAllocator that stores another allocator. ++ /// The StoragePolicy defines the allocator type being stored and how it is stored. + /// The \c Mutex controls synchronization of the access. + /// \ingroup memory_storage + template +@@ -322,7 +322,7 @@ namespace foonathan + { + }; + +- /// A \concept{concept_storagepolicy,StoragePolicy} that stores the allocator directly. ++ /// A StoragePolicy that stores the allocator directly. + /// It embeds the allocator inside it, i.e. moving the storage policy will move the allocator. + /// \ingroup memory_storage + template +@@ -379,7 +379,7 @@ namespace foonathan + }; + + /// An alias template for \ref allocator_storage using the \ref direct_storage policy without a mutex. +- /// It has the effect of giving any \concept{concept_rawallocator,RawAllocator} the interface with all member functions, ++ /// It has the effect of giving any RawAllocator the interface with all member functions, + /// avoiding the need to wrap it inside the \ref allocator_traits. + /// \ingroup memory_storage + template +@@ -521,7 +521,7 @@ namespace foonathan + }; + } // namespace detail + +- /// Specifies whether or not a \concept{concept_rawallocator,RawAllocator} has shared semantics. ++ /// Specifies whether or not a RawAllocator has shared semantics. + /// It is shared, if - like \ref allocator_reference - if multiple objects refer to the same internal allocator and if it can be copied. + /// This sharing is stateful, however, stateless allocators are not considered shared in the meaning of this traits.
+ /// If a \c RawAllocator is shared, it will be directly embedded inside \ref reference_storage since it already provides \ref allocator_reference like semantics, so there is no need to add them manually,
+@@ -534,7 +534,7 @@ namespace foonathan + { + }; + +- /// A \concept{concept_storagepolicy,StoragePolicy} that stores a reference to an allocator. ++ /// A StoragePolicy that stores a reference to an allocator. + /// For stateful allocators it only stores a pointer to an allocator object and copying/moving only copies the pointer. + /// For stateless allocators it does not store anything, an allocator will be constructed as needed. + /// For allocators that are already shared (determined through \ref is_shared_allocator) it will store the allocator type directly. +@@ -711,7 +711,7 @@ namespace foonathan + public: + using allocator_type = FOONATHAN_IMPL_DEFINED(base_allocator); + +- /// \effects Creates it from a reference to any stateful \concept{concept_rawallocator,RawAllocator}. ++ /// \effects Creates it from a reference to any stateful RawAllocator. + /// It will store a pointer to this allocator object. + /// \note The user has to take care that the lifetime of the reference does not exceed the allocator lifetime. + template +@@ -723,7 +723,7 @@ namespace foonathan + ::new (static_cast(&storage_)) basic_allocator(alloc); + } + +- // \effects Creates it from any stateless \concept{concept_rawallocator,RawAllocator}. ++ // \effects Creates it from any stateless RawAllocator. + /// It will not store anything, only creates the allocator as needed. + /// \requires The \c RawAllocator is stateless. + template +@@ -771,7 +771,7 @@ namespace foonathan + + /// \returns A reference to the allocator. + /// The actual type is implementation-defined since it is the base class used in the type-erasure, +- /// but it provides the full \concept{concept_rawallocator,RawAllocator} member functions. ++ /// but it provides the full RawAllocator member functions. + /// \note There is no way to access any custom member functions of the allocator type. + allocator_type& get_allocator() const noexcept + { +@@ -913,7 +913,7 @@ namespace foonathan + using any_reference_storage = reference_storage; + + /// An alias for \ref allocator_storage using the \ref any_reference_storage. +- /// It will store a reference to any \concept{concept_rawallocator,RawAllocator}. ++ /// It will store a reference to any RawAllocator. + /// This is the same as passing the tag type \ref any_allocator to the alias \ref allocator_reference. + /// Wrap the allocator in a \ref thread_safe_allocator if you want thread safety. + /// \ingroup memory_storage +diff --git a/include/foonathan/memory/allocator_traits.hpp b/include/foonathan/memory/allocator_traits.hpp +index 03b7ecdebc3511a07a1305b3101f28a6e304abc3..46a77ebac31ff33d451890b12f3530cefe42e151 100644 +--- a/include/foonathan/memory/allocator_traits.hpp ++++ b/include/foonathan/memory/allocator_traits.hpp +@@ -50,7 +50,7 @@ namespace foonathan + }; + } // namespace detail + +- /// Traits class that checks whether or not a standard \c Allocator can be used as \concept{concept_rawallocator,RawAllocator}. ++ /// Traits class that checks whether or not a standard \c Allocator can be used as RawAllocator. + /// It checks the existence of a custom \c construct(), \c destroy() function, if provided, + /// it cannot be used since it would not be called.
+ /// Specialize it for custom \c Allocator types to override this check. +@@ -283,7 +283,7 @@ namespace foonathan + } + } // namespace traits_detail + +- /// The default specialization of the allocator_traits for a \concept{concept_rawallocator,RawAllocator}. ++ /// The default specialization of the allocator_traits for a RawAllocator. + /// See the last link for the requirements on types that do not specialize this class and the interface documentation. + /// Any specialization must provide the same interface. + /// \ingroup memory_core +@@ -408,7 +408,7 @@ namespace foonathan + }; + } // namespace detail + +- /// Traits that check whether a type models concept \concept{concept_rawallocator,RawAllocator}.
++ /// Traits that check whether a type models concept RawAllocator.
+ /// It must either provide the necessary functions for the default traits specialization or has specialized it. + /// \ingroup memory_core + template +@@ -491,7 +491,7 @@ namespace foonathan + } + } // namespace traits_detail + +- /// The default specialization of the composable_allocator_traits for a \concept{concept_composableallocator,ComposableAllocator}. ++ /// The default specialization of the composable_allocator_traits for a ComposableAllocator. + /// See the last link for the requirements on types that do not specialize this class and the interface documentation. + /// Any specialization must provide the same interface. + /// \ingroup memory_core +@@ -586,8 +586,8 @@ namespace foonathan + }; + } // namespace detail + +- /// Traits that check whether a type models concept \concept{concept_rawallocator,ComposableAllocator}.
+- /// It must be a \concept{concept_rawallocator,RawAllocator} and either provide the necessary functions for the default traits specialization or has specialized it. ++ /// Traits that check whether a type models concept ComposableAllocator.
++ /// It must be a RawAllocator and either provide the necessary functions for the default traits specialization or has specialized it. + /// \ingroup memory_core + template + struct is_composable_allocator +diff --git a/include/foonathan/memory/container.hpp b/include/foonathan/memory/container.hpp +index c954ca5deece3f4430fb934642b60e2e4550deff..307ca115ea529655666c81766f385dda5ac68c3b 100644 +--- a/include/foonathan/memory/container.hpp ++++ b/include/foonathan/memory/container.hpp +@@ -5,7 +5,7 @@ + #define FOONATHAN_MEMORY_CONTAINER_HPP_INCLUDED + + /// \file +-/// Aliasas for STL containers using a certain \concept{concept_rawallocator,RawAllocator}. ++/// Aliasas for STL containers using a certain RawAllocator. + /// \note Only available on a hosted implementation. + + #include "config.hpp" +@@ -40,7 +40,7 @@ namespace foonathan + /// @{ + + /// Alias template for an STL container that uses a certain +- /// \concept{concept_rawallocator,RawAllocator}. It is just a shorthand for a passing in the \c ++ /// RawAllocator. It is just a shorthand for a passing in the \c + /// RawAllocator wrapped in a \ref foonathan::memory::std_allocator. + template + FOONATHAN_ALIAS_TEMPLATE(vector, std::vector>); +@@ -212,7 +212,7 @@ namespace foonathan + + /// @{ + /// Convenience function to create a container adapter using a certain +- /// \concept{concept_rawallocator,RawAllocator}. \returns An empty adapter with an ++ /// RawAllocator. \returns An empty adapter with an + /// implementation container using a reference to a given allocator. \ingroup memory_adapter + template > + std::stack make_stack(RawAllocator& allocator) +@@ -355,7 +355,7 @@ namespace foonathan + #if !defined(FOONATHAN_MEMORY_NO_NODE_SIZE) + /// The node size required by \ref allocate_shared. + /// \note This is similar to \ref shared_ptr_node_size but takes a +- /// \concept{concept_rawallocator,RawAllocator} instead. ++ /// RawAllocator instead. + template + struct allocate_shared_node_size : shared_ptr_node_size> + { +diff --git a/include/foonathan/memory/default_allocator.hpp b/include/foonathan/memory/default_allocator.hpp +index 8466bc3a6ecac6cc1ef7c95cb78206b2e56dbf57..f61d3a1385ffafd3d9ffde6322e6cd99c56a9d21 100644 +--- a/include/foonathan/memory/default_allocator.hpp ++++ b/include/foonathan/memory/default_allocator.hpp +@@ -21,9 +21,9 @@ namespace foonathan + { + namespace memory + { +- /// The default \concept{concept_rawallocator,RawAllocator} that will be used as \concept{concept_blockallocator,BlockAllocator} in memory arenas. ++ /// The default RawAllocator that will be used as BlockAllocator in memory arenas. + /// Arena allocators like \ref memory_stack or \ref memory_pool allocate memory by subdividing a huge block. +- /// They get a \concept{concept_blockallocator,BlockAllocator} that will be used for their internal allocation, ++ /// They get a BlockAllocator that will be used for their internal allocation, + /// this type is the default value. + /// \requiredbe Its type can be changed via the CMake option \c FOONATHAN_MEMORY_DEFAULT_ALLCOATOR, + /// but it must be one of the following: \ref heap_allocator, \ref new_allocator, \ref malloc_allocator, \ref static_allocator, \ref virtual_memory_allocator. +diff --git a/include/foonathan/memory/deleter.hpp b/include/foonathan/memory/deleter.hpp +index fe3ce220dc751ed86b2f4822693f4524f53d47d1..1d87323a522216e484f8fc94a0db38fac1d1bd7c 100644 +--- a/include/foonathan/memory/deleter.hpp ++++ b/include/foonathan/memory/deleter.hpp +@@ -5,7 +5,7 @@ + #define FOONATHAN_MEMORY_DELETER_HPP_INCLUDED + + /// \file +-/// \c Deleter classes using a \concept{concept_rawallocator,RawAllocator}. ++/// \c Deleter classes using a RawAllocator. + + #include + +@@ -17,7 +17,7 @@ namespace foonathan + { + namespace memory + { +- /// A deleter class that deallocates the memory through a specified \concept{concept_rawallocator,RawAllocator}. ++ /// A deleter class that deallocates the memory through a specified RawAllocator. + /// + /// It deallocates memory for a specified type but does not call its destructors. + /// \ingroup memory_adapter +@@ -116,7 +116,7 @@ namespace foonathan + std::size_t size_; + }; + +- /// A deleter class that deallocates the memory of a derived type through a specified \concept{concept_rawallocator,RawAllocator}. ++ /// A deleter class that deallocates the memory of a derived type through a specified RawAllocator. + /// + /// It can only be created from a \ref allocator_deallocator and thus must only be used for smart pointers initialized by derived-to-base conversion of the pointer. + /// \ingroup memory_adapter +diff --git a/include/foonathan/memory/fallback_allocator.hpp b/include/foonathan/memory/fallback_allocator.hpp +index b4157062d42060be4fe649fe1e84af5aec0567cf..5e164cb8af2db919b2e0c3c101bf708880aa0545 100644 +--- a/include/foonathan/memory/fallback_allocator.hpp ++++ b/include/foonathan/memory/fallback_allocator.hpp +@@ -16,11 +16,11 @@ namespace foonathan + { + namespace memory + { +- /// A \concept{raw_allocator,RawAllocator} with a fallback. ++ /// A RawAllocator with a fallback. + /// Allocation first tries `Default`, if it fails, + /// it uses `Fallback`. +- /// \requires `Default` must be a composable \concept{concept_rawallocator,RawAllocator}, +- /// `Fallback` must be a \concept{concept_rawallocator,RawAllocator}. ++ /// \requires `Default` must be a composable RawAllocator, ++ /// `Fallback` must be a RawAllocator. + /// \ingroup memory_adapter + template + class fallback_allocator +diff --git a/include/foonathan/memory/heap_allocator.hpp b/include/foonathan/memory/heap_allocator.hpp +index ed8f2fb9af2d593fde141b3bdb8b17e8074f8c9c..88e8d7cb5711fd564caa9262d3390af81b3bd4df 100644 +--- a/include/foonathan/memory/heap_allocator.hpp ++++ b/include/foonathan/memory/heap_allocator.hpp +@@ -65,7 +65,7 @@ namespace foonathan + heap_alloator_leak_checker) + } // namespace detail + +- /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory from the heap. ++ /// A stateless RawAllocator that allocates memory from the heap. + /// It uses the two functions \ref heap_alloc and \ref heap_dealloc for the allocation, + /// which default to \c std::malloc and \c std::free. + /// \ingroup memory_allocator +diff --git a/include/foonathan/memory/iteration_allocator.hpp b/include/foonathan/memory/iteration_allocator.hpp +index fdfcfa0f80d9fe5b4ea6fbec06420697f20b77b4..dbcc8f74b9feed75dc579845b23a58c828013920 100644 +--- a/include/foonathan/memory/iteration_allocator.hpp ++++ b/include/foonathan/memory/iteration_allocator.hpp +@@ -24,7 +24,7 @@ namespace foonathan + make_block_allocator_t; + } // namespace detail + +- /// A stateful \concept{concept_rawallocator,RawAllocator} that is designed for allocations in a loop. ++ /// A stateful RawAllocator that is designed for allocations in a loop. + /// It uses `N` stacks for the allocation, one of them is always active. + /// Allocation uses the currently active stack. + /// Calling \ref iteration_allocator::next_iteration() at the end of the loop, +@@ -40,7 +40,7 @@ namespace foonathan + public: + using allocator_type = detail::iteration_block_allocator; + +- /// \effects Creates it with a given initial block size and and other constructor arguments for the \concept{concept_blockallocator,BlockAllocator}. ++ /// \effects Creates it with a given initial block size and and other constructor arguments for the BlockAllocator. + /// It will allocate the first (and only) block and evenly divide it on all the stacks it uses. + template + explicit iteration_allocator(std::size_t block_size, Args&&... args) +@@ -89,7 +89,7 @@ namespace foonathan + + /// \effects Allocates a memory block of given size and alignment. + /// It simply moves the top marker of the currently active stack. +- /// \returns A \concept{concept_node,node} with given size and alignment. ++ /// \returns A node with given size and alignment. + /// \throws \ref out_of_fixed_memory if the current stack does not have any memory left. + /// \requires \c size and \c alignment must be valid. + void* allocate(std::size_t size, std::size_t alignment) +@@ -106,7 +106,7 @@ namespace foonathan + + /// \effects Allocates a memory block of given size and alignment + /// similar to \ref allocate(). +- /// \returns A \concept{concept_node,node} with given size and alignment ++ /// \returns A node with given size and alignment + /// or `nullptr` if the current stack does not have any memory left. + void* try_allocate(std::size_t size, std::size_t alignment) noexcept + { +@@ -139,7 +139,7 @@ namespace foonathan + return cur_; + } + +- /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the memory. ++ /// \returns A reference to the BlockAllocator used for managing the memory. + /// \requires It is undefined behavior to move this allocator out into another object. + allocator_type& get_allocator() noexcept + { +diff --git a/include/foonathan/memory/joint_allocator.hpp b/include/foonathan/memory/joint_allocator.hpp +index 894ac381e82950637783ebe9f7100a95d3240da3..09e3230f9cdff7de0b5e29e4267358fb1c076698 100644 +--- a/include/foonathan/memory/joint_allocator.hpp ++++ b/include/foonathan/memory/joint_allocator.hpp +@@ -205,7 +205,7 @@ namespace foonathan + /// make sure that you do not call their regular copy/move constructors, + /// but instead the version where you pass an allocator. + /// +- /// The memory block will be managed by the given \concept{concept_rawallocator,RawAllocator}, ++ /// The memory block will be managed by the given RawAllocator, + /// it is stored in an \ref allocator_reference and not owned by the pointer directly. + /// \ingroup memory_allocator + template +@@ -220,7 +220,7 @@ namespace foonathan + + //=== constructors/destructor/assignment ===// + /// @{ +- /// \effects Creates it with a \concept{concept_rawallocator,RawAllocator}, but does not own a new object. ++ /// \effects Creates it with a RawAllocator, but does not own a new object. + explicit joint_ptr(allocator_type& alloc) noexcept + : allocator_reference(alloc), ptr_(nullptr) + { +@@ -235,7 +235,7 @@ namespace foonathan + /// @{ + /// \effects Reserves memory for the object and the additional size, + /// and creates the object by forwarding the arguments to its constructor. +- /// The \concept{concept_rawallocator,RawAllocator} will be used for the allocation. ++ /// The RawAllocator will be used for the allocation. + template + joint_ptr(allocator_type& alloc, joint_size additional_size, Args&&... args) + : joint_ptr(alloc) +@@ -493,7 +493,7 @@ namespace foonathan + } + /// @} + +- /// A \concept{concept_rawallocator,RawAllocator} that uses the additional joint memory for its allocation. ++ /// A RawAllocator that uses the additional joint memory for its allocation. + /// + /// It is somewhat limited and allows only allocation once. + /// All joint allocators for an object share the joint memory and must not be used in multiple threads. +diff --git a/include/foonathan/memory/malloc_allocator.hpp b/include/foonathan/memory/malloc_allocator.hpp +index cc3700cfe2f2339aca2808a745ae1d02b3f11ffb..f4e4c5d2eb35c62e41212d4d1491c06079c08624 100644 +--- a/include/foonathan/memory/malloc_allocator.hpp ++++ b/include/foonathan/memory/malloc_allocator.hpp +@@ -54,7 +54,7 @@ namespace foonathan + malloc_alloator_leak_checker) + } // namespace detail + +- /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using std::malloc(). ++ /// A stateless RawAllocator that allocates memory using std::malloc(). + /// It throws \ref out_of_memory when the allocation fails. + /// \ingroup memory_allocator + using malloc_allocator = +diff --git a/include/foonathan/memory/memory_arena.hpp b/include/foonathan/memory/memory_arena.hpp +index 645796bece4f81fd7c84c6c039b1ee619499daff..eb969a677329b5b2d536f39f9a15817f040cf79f 100644 +--- a/include/foonathan/memory/memory_arena.hpp ++++ b/include/foonathan/memory/memory_arena.hpp +@@ -5,7 +5,7 @@ + #define FOONATHAN_MEMORY_MEMORY_ARENA_HPP_INCLUDED + + /// \file +-/// Class \ref foonathan::memory::memory_arena and related functionality regarding \concept{concept_blockallocator,BlockAllocators}. ++/// Class \ref foonathan::memory::memory_arena and related functionality regarding BlockAllocators. + + #include + +@@ -66,7 +66,7 @@ namespace foonathan + std::false_type is_block_allocator_impl(short); + } // namespace detail + +- /// Traits that check whether a type models concept \concept{concept_blockallocator,BlockAllocator}. ++ /// Traits that check whether a type models concept BlockAllocator. + /// \ingroup memory_core + template + struct is_block_allocator : decltype(detail::is_block_allocator_impl(0)) +@@ -264,7 +264,7 @@ namespace foonathan + /// A memory arena that manages huge memory blocks for a higher-level allocator. + /// Some allocators like \ref memory_stack work on huge memory blocks, + /// this class manages them fro those allocators. +- /// It uses a \concept{concept_blockallocator,BlockAllocator} for the allocation of those blocks. ++ /// It uses a BlockAllocator for the allocation of those blocks. + /// The memory blocks in use are put onto a stack like structure, deallocation will pop from the top, + /// so it is only possible to deallocate the last allocated block of the arena. + /// By default, blocks are not really deallocated but stored in a cache. +@@ -292,9 +292,9 @@ namespace foonathan + return detail::memory_block_stack::implementation_offset() + byte_size; + } + +- /// \effects Creates it by giving it the size and other arguments for the \concept{concept_blockallocator,BlockAllocator}. ++ /// \effects Creates it by giving it the size and other arguments for the BlockAllocator. + /// It forwards these arguments to its constructor. +- /// \requires \c block_size must be greater than \c min_block_size(0) and other requirements depending on the \concept{concept_blockallocator,BlockAllocator}. ++ /// \requires \c block_size must be greater than \c min_block_size(0) and other requirements depending on the BlockAllocator. + /// \throws Anything thrown by the constructor of the \c BlockAllocator. + template + explicit memory_arena(std::size_t block_size, Args&&... args) +@@ -303,7 +303,7 @@ namespace foonathan + FOONATHAN_MEMORY_ASSERT(block_size > min_block_size(0)); + } + +- /// \effects Deallocates all memory blocks that where requested back to the \concept{concept_blockallocator,BlockAllocator}. ++ /// \effects Deallocates all memory blocks that where requested back to the BlockAllocator. + ~memory_arena() noexcept + { + // clear cache +@@ -346,7 +346,7 @@ namespace foonathan + /// It first uses a cache of previously deallocated blocks, if caching is enabled, + /// if it is empty, allocates a new one. + /// \returns The new \ref memory_block. +- /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} allocation function. ++ /// \throws Anything thrown by the BlockAllocator allocation function. + memory_block allocate_block() + { + if (!this->take_from_cache(used_)) +@@ -411,7 +411,7 @@ namespace foonathan + /// \returns The size of the next memory block, + /// i.e. of the next call to \ref allocate_block(). + /// If there are blocks in the cache, returns size of the next one. +- /// Otherwise forwards to the \concept{concept_blockallocator,BlockAllocator} and subtracts an implementation offset. ++ /// Otherwise forwards to the BlockAllocator and subtracts an implementation offset. + std::size_t next_block_size() const noexcept + { + return this->cache_empty() ? +@@ -420,7 +420,7 @@ namespace foonathan + this->cached_block_size(); + } + +- /// \returns A reference of the \concept{concept_blockallocator,BlockAllocator} object. ++ /// \returns A reference of the BlockAllocator object. + /// \requires It is undefined behavior to move this allocator out into another object. + allocator_type& get_allocator() noexcept + { +@@ -438,7 +438,7 @@ namespace foonathan + extern template class memory_arena; + #endif + +- /// A \concept{concept_blockallocator,BlockAllocator} that uses a given \concept{concept_rawallocator,RawAllocator} for allocating the blocks. ++ /// A BlockAllocator that uses a given RawAllocator for allocating the blocks. + /// It calls the \c allocate_array() function with a node of size \c 1 and maximum alignment on the used allocator for the block allocation. + /// The size of the next memory block will grow by a given factor after each allocation, + /// allowing an amortized constant allocation time in the higher level allocator. +@@ -466,7 +466,7 @@ namespace foonathan + + /// \effects Allocates a new memory block and increases the block size for the next allocation. + /// \returns The new \ref memory_block. +- /// \throws Anything thrown by the \c allocate_array() function of the \concept{concept_rawallocator,RawAllocator}. ++ /// \throws Anything thrown by the \c allocate_array() function of the RawAllocator. + memory_block allocate_block() + { + auto memory = +@@ -491,7 +491,7 @@ namespace foonathan + return block_size_; + } + +- /// \returns A reference to the used \concept{concept_rawallocator,RawAllocator} object. ++ /// \returns A reference to the used RawAllocator object. + allocator_type& get_allocator() noexcept + { + return *this; +@@ -519,9 +519,9 @@ namespace foonathan + extern template class memory_arena, false>; + #endif + +- /// A \concept{concept_blockallocator,BlockAllocator} that allows only one block allocation. ++ /// A BlockAllocator that allows only one block allocation. + /// It can be used to prevent higher-level allocators from expanding. +- /// The one block allocation is performed through the \c allocate_array() function of the given \concept{concept_rawallocator,RawAllocator}. ++ /// The one block allocation is performed through the \c allocate_array() function of the given RawAllocator. + /// \ingroup memory_adapter + template + class fixed_block_allocator : FOONATHAN_EBO(allocator_traits::allocator_type) +@@ -541,7 +541,7 @@ namespace foonathan + + /// \effects Allocates a new memory block or throws an exception if there was already one allocation. + /// \returns The new \ref memory_block. +- /// \throws Anything thrown by the \c allocate_array() function of the \concept{concept_rawallocator,RawAllocator} or \ref out_of_memory if this is not the first call. ++ /// \throws Anything thrown by the \c allocate_array() function of the RawAllocator or \ref out_of_memory if this is not the first call. + memory_block allocate_block() + { + if (block_size_) +@@ -572,7 +572,7 @@ namespace foonathan + return block_size_; + } + +- /// \returns A reference to the used \concept{concept_rawallocator,RawAllocator} object. ++ /// \returns A reference to the used RawAllocator object. + allocator_type& get_allocator() noexcept + { + return *this; +@@ -613,9 +613,9 @@ namespace foonathan + } + } // namespace detail + +- /// Takes either a \concept{concept_blockallocator,BlockAllocator} or a \concept{concept_rawallocator,RawAllocator}. +- /// In the first case simply aliases the type unchanged, in the second to \ref growing_block_allocator (or the template in `BlockAllocator`) with the \concept{concept_rawallocator,RawAllocator}. +- /// Using this allows passing normal \concept{concept_rawallocator,RawAllocators} as \concept{concept_blockallocator,BlockAllocators}. ++ /// Takes either a BlockAllocator or a RawAllocator. ++ /// In the first case simply aliases the type unchanged, in the second to \ref growing_block_allocator (or the template in `BlockAllocator`) with the RawAllocator. ++ /// Using this allows passing normal RawAllocators as BlockAllocators. + /// \ingroup memory_core + template class BlockAllocator = detail::default_block_wrapper> +@@ -625,8 +625,8 @@ namespace foonathan + BlockAllocator>::type); + + /// @{ +- /// Helper function make a \concept{concept_blockallocator,BlockAllocator}. +- /// \returns A \concept{concept_blockallocator,BlockAllocator} of the given type created with the given arguments. ++ /// Helper function make a BlockAllocator. ++ /// \returns A BlockAllocator of the given type created with the given arguments. + /// \requires Same requirements as the constructor. + /// \ingroup memory_core + template +diff --git a/include/foonathan/memory/memory_pool.hpp b/include/foonathan/memory/memory_pool.hpp +index 7e833a6e55ee3fb4315b693303a9252a494426f1..3ac5fe7a826d2ee2a58182a0630f82e816c364e6 100644 +--- a/include/foonathan/memory/memory_pool.hpp ++++ b/include/foonathan/memory/memory_pool.hpp +@@ -32,7 +32,7 @@ namespace foonathan + }; + } // namespace detail + +- /// A stateful \concept{concept_rawallocator,RawAllocator} that manages \concept{concept_node,nodes} of fixed size. ++ /// A stateful RawAllocator that manages nodes of fixed size. + /// It uses a \ref memory_arena with a given \c BlockOrRawAllocator defaulting to \ref growing_block_allocator, + /// subdivides them in small nodes of given size and puts them onto a free list. + /// Allocation and deallocation simply remove or add nodes from this list and are thus fast. +@@ -57,8 +57,8 @@ namespace foonathan + static constexpr std::size_t min_node_size = + FOONATHAN_IMPL_DEFINED(free_list::min_element_size); + +- /// \returns The minimum block size required for certain number of \concept{concept_node,node}. +- /// \requires \c node_size must be a valid \concept{concept_node,node size} ++ /// \returns The minimum block size required for certain number of node. ++ /// \requires \c node_size must be a valid node size + /// and \c number_of_nodes must be a non-zero value. + /// \note MSVC's implementation of \c std::list for example is never empty and always allocates proxy nodes. + /// To get enough memory for \c N elements of a list, \c number_of_nodes needs to include the proxy count in addition to \c N. +@@ -69,12 +69,12 @@ namespace foonathan + + free_list::min_block_size(node_size, number_of_nodes); + } + +- /// \effects Creates it by specifying the size each \concept{concept_node,node} will have, +- /// the initial block size for the arena and other constructor arguments for the \concept{concept_blockallocator,BlockAllocator}. ++ /// \effects Creates it by specifying the size each node will have, ++ /// the initial block size for the arena and other constructor arguments for the BlockAllocator. + /// If the \c node_size is less than the \c min_node_size, the \c min_node_size will be the actual node size. +- /// It will allocate an initial memory block with given size from the \concept{concept_blockallocator,BlockAllocator} ++ /// It will allocate an initial memory block with given size from the BlockAllocator + /// and puts it onto the free list. +- /// \requires \c node_size must be a valid \concept{concept_node,node size} ++ /// \requires \c node_size must be a valid node size + /// and \c block_size must be at least \c min_block_size(node_size, 1). + template + memory_pool(std::size_t node_size, std::size_t block_size, Args&&... args) +@@ -84,7 +84,7 @@ namespace foonathan + } + + /// \effects Destroys the \ref memory_pool by returning all memory blocks, +- /// regardless of properly deallocated back to the \concept{concept_blockallocator,BlockAllocator}. ++ /// regardless of properly deallocated back to the BlockAllocator. + ~memory_pool() noexcept {} + + /// @{ +@@ -108,12 +108,12 @@ namespace foonathan + } + /// @} + +- /// \effects Allocates a single \concept{concept_node,node} by removing it from the free list. ++ /// \effects Allocates a single node by removing it from the free list. + /// If the free list is empty, a new memory block will be allocated from the arena and put onto it. + /// The new block size will be \ref next_capacity() big. + /// \returns A node of size \ref node_size() suitable aligned, + /// i.e. suitable for any type where sizeof(T) < node_size(). +- /// \throws Anything thrown by the used \concept{concept_blockallocator,BlockAllocator}'s allocation function if a growth is needed. ++ /// \throws Anything thrown by the used BlockAllocator's allocation function if a growth is needed. + void* allocate_node() + { + if (free_list_.empty()) +@@ -122,7 +122,7 @@ namespace foonathan + return free_list_.allocate(); + } + +- /// \effects Allocates a single \concept{concept_node,node} similar to \ref allocate_node(). ++ /// \effects Allocates a single node similar to \ref allocate_node(). + /// But if the free list is empty, a new block will *not* be allocated. + /// \returns A suitable aligned node of size \ref node_size() or `nullptr`. + void* try_allocate_node() noexcept +@@ -130,13 +130,13 @@ namespace foonathan + return free_list_.empty() ? nullptr : free_list_.allocate(); + } + +- /// \effects Allocates an \concept{concept_array,array} of nodes by searching for \c n continuous nodes on the list and removing them. ++ /// \effects Allocates an array of nodes by searching for \c n continuous nodes on the list and removing them. + /// Depending on the \c PoolType this can be a slow operation or not allowed at all. + /// This can sometimes lead to a growth, even if technically there is enough continuous memory on the free list. + /// \returns An array of \c n nodes of size \ref node_size() suitable aligned. +- /// \throws Anything thrown by the used \concept{concept_blockallocator,BlockAllocator}'s allocation function if a growth is needed, ++ /// \throws Anything thrown by the used BlockAllocator's allocation function if a growth is needed, + /// or \ref bad_array_size if n * node_size() is too big. +- /// \requires \c n must be valid \concept{concept_array,array count}. ++ /// \requires \c n must be valid array count. + void* allocate_array(std::size_t n) + { + detail::check_allocation_size( +@@ -145,7 +145,7 @@ namespace foonathan + return allocate_array(n, node_size()); + } + +- /// \effects Allocates an \concept{concept_array,array} of nodes similar to \ref allocate_array(). ++ /// \effects Allocates an array of nodes similar to \ref allocate_array(). + /// But it will never allocate a new memory block. + /// \returns An array of \c n nodes of size \ref node_size() suitable aligned + /// or `nullptr`. +@@ -154,7 +154,7 @@ namespace foonathan + return try_allocate_array(n, node_size()); + } + +- /// \effects Deallocates a single \concept{concept_node,node} by putting it back onto the free list. ++ /// \effects Deallocates a single node by putting it back onto the free list. + /// \requires \c ptr must be a result from a previous call to \ref allocate_node() on the same free list, + /// i.e. either this allocator object or a new object created by moving this to it. + void deallocate_node(void* ptr) noexcept +@@ -162,7 +162,7 @@ namespace foonathan + free_list_.deallocate(ptr); + } + +- /// \effects Deallocates a single \concept{concept_node,node} but it does not be a result of a previous call to \ref allocate_node(). ++ /// \effects Deallocates a single node but it does not be a result of a previous call to \ref allocate_node(). + /// \returns `true` if the node could be deallocated, `false` otherwise. + /// \note Some free list implementations can deallocate any memory, + /// doesn't matter where it is coming from. +@@ -174,7 +174,7 @@ namespace foonathan + return true; + } + +- /// \effects Deallocates an \concept{concept_array,array} by putting it back onto the free list. ++ /// \effects Deallocates an array by putting it back onto the free list. + /// \requires \c ptr must be a result from a previous call to \ref allocate_array() with the same \c n on the same free list, + /// i.e. either this allocator object or a new object created by moving this to it. + void deallocate_array(void* ptr, std::size_t n) noexcept +@@ -183,7 +183,7 @@ namespace foonathan + free_list_.deallocate(ptr, n * node_size()); + } + +- /// \effects Deallocates an \concept{concept_array,array} but it does not be a result of a previous call to \ref allocate_array(). ++ /// \effects Deallocates an array but it does not be a result of a previous call to \ref allocate_array(). + /// \returns `true` if the node could be deallocated, `false` otherwise. + /// \note Some free list implementations can deallocate any memory, + /// doesn't matter where it is coming from. +@@ -192,7 +192,7 @@ namespace foonathan + return try_deallocate_array(ptr, n, node_size()); + } + +- /// \returns The size of each \concept{concept_node,node} in the pool, ++ /// \returns The size of each node in the pool, + /// this is either the same value as in the constructor or \c min_node_size if the value was too small. + std::size_t node_size() const noexcept + { +@@ -215,7 +215,7 @@ namespace foonathan + return free_list_.usable_size(arena_.next_block_size()); + } + +- /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the arena. ++ /// \returns A reference to the BlockAllocator used for managing the arena. + /// \requires It is undefined behavior to move this allocator out into another object. + allocator_type& get_allocator() noexcept + { +@@ -306,7 +306,7 @@ namespace foonathan + /// \effects Forwards to \ref memory_pool::allocate_array() + /// with the number of nodes adjusted to be the minimum, + /// i.e. when the \c size is less than the \ref memory_pool::node_size(). +- /// \returns A \concept{concept_array,array} with specified properties. ++ /// \returns A array with specified properties. + /// \requires The \ref memory_pool has to support array allocations. + /// \throws Anything thrown by the pool allocation function. + static void* allocate_array(allocator_type& state, std::size_t count, std::size_t size, +@@ -382,7 +382,7 @@ namespace foonathan + /// \effects Forwards to \ref memory_pool::try_allocate_array() + /// with the number of nodes adjusted to be the minimum, + /// if the \c size is less than the \ref memory_pool::node_size(). +- /// \returns A \concept{concept_array,array} with specified properties ++ /// \returns A array with specified properties + /// or `nullptr` if it was unable to allocate. + static void* try_allocate_array(allocator_type& state, std::size_t count, + std::size_t size, std::size_t alignment) noexcept +diff --git a/include/foonathan/memory/memory_pool_collection.hpp b/include/foonathan/memory/memory_pool_collection.hpp +index 5467efe6c865a49563aa877d417641e6b1c840e9..2951a560c29771ba45c0fce501eb17baf2430048 100644 +--- a/include/foonathan/memory/memory_pool_collection.hpp ++++ b/include/foonathan/memory/memory_pool_collection.hpp +@@ -49,11 +49,11 @@ namespace foonathan + using type = detail::log2_access_policy; + }; + +- /// A stateful \concept{concept_rawallocator,RawAllocator} that behaves as a collection of multiple \ref memory_pool objects. ++ /// A stateful RawAllocator that behaves as a collection of multiple \ref memory_pool objects. + /// It maintains a list of multiple free lists, whose types are controlled via the \c PoolType tags defined in \ref memory_pool_type.hpp, + /// each of a different size as defined in the \c BucketDistribution (\ref identity_buckets or \ref log2_buckets). + /// Allocating a node of given size will use the appropriate free list.
+- /// This allocator is ideal for \concept{concept_node,node} allocations in any order but with a predefined set of sizes, ++ /// This allocator is ideal for node allocations in any order but with a predefined set of sizes, + /// not only one size like \ref memory_pool. + /// \ingroup memory_allocator + template + memory_pool_collection(std::size_t max_node_size, std::size_t block_size, + Args&&... args) +@@ -87,7 +87,7 @@ namespace foonathan + } + + /// \effects Destroys the \ref memory_pool_collection by returning all memory blocks, +- /// regardless of properly deallocated back to the \concept{concept_blockallocator,BlockAllocator}. ++ /// regardless of properly deallocated back to the BlockAllocator. + ~memory_pool_collection() noexcept = default; + + /// @{ +@@ -113,16 +113,16 @@ namespace foonathan + } + /// @} + +- /// \effects Allocates a \concept{concept_node,node} of given size. ++ /// \effects Allocates a node of given size. + /// It first finds the appropriate free list as defined in the \c BucketDistribution. + /// If it is empty, it will use an implementation defined amount of memory from the arena + /// and inserts it in it. +- /// If the arena is empty too, it will request a new memory block from the \concept{concept_blockallocator,BlockAllocator} ++ /// If the arena is empty too, it will request a new memory block from the BlockAllocator + /// of size \ref next_capacity() and puts part of it onto this free list. + /// Then it removes a node from it. +- /// \returns A \concept{concept_node,node} of given size suitable aligned, ++ /// \returns A node of given size suitable aligned, + /// i.e. suitable for any type where sizeof(T) < node_size. +- /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} if a growth is needed or a \ref bad_node_size exception if the node size is too big. ++ /// \throws Anything thrown by the BlockAllocator if a growth is needed or a \ref bad_node_size exception if the node size is too big. + void* allocate_node(std::size_t node_size) + { + detail::check_allocation_size( +@@ -139,10 +139,10 @@ namespace foonathan + return mem; + } + +- /// \effects Allocates a \concept{concept_node,node} of given size. ++ /// \effects Allocates a node of given size. + /// It is similar to \ref allocate_node() but will return `nullptr` on any failure, + /// instead of growing the arnea and possibly throwing. +- /// \returns A \concept{concept_node,node} of given size suitable aligned ++ /// \returns A node of given size suitable aligned + /// or `nullptr` in case of failure. + void* try_allocate_node(std::size_t node_size) noexcept + { +@@ -158,15 +158,15 @@ namespace foonathan + return pool.allocate(); + } + +- /// \effects Allocates an \concept{concept_array,array} of nodes by searching for \c n continuous nodes on the appropriate free list and removing them. ++ /// \effects Allocates an array of nodes by searching for \c n continuous nodes on the appropriate free list and removing them. + /// Depending on the \c PoolType this can be a slow operation or not allowed at all. + /// This can sometimes lead to a growth on the free list, even if technically there is enough continuous memory on the free list. + /// Otherwise has the same behavior as \ref allocate_node(). + /// \returns An array of \c n nodes of size \c node_size suitable aligned. +- /// \throws Anything thrown by the used \concept{concept_blockallocator,BlockAllocator}'s allocation function if a growth is needed, ++ /// \throws Anything thrown by the used BlockAllocator's allocation function if a growth is needed, + /// or a \ref bad_allocation_size exception. +- /// \requires \c count must be valid \concept{concept_array,array count} and +- /// \c node_size must be valid \concept{concept_node,node size}. ++ /// \requires \c count must be valid array count and ++ /// \c node_size must be valid node size. + void* allocate_array(std::size_t count, std::size_t node_size) + { + detail::check_allocation_size( +@@ -202,10 +202,10 @@ namespace foonathan + return mem; + } + +- /// \effects Allocates a \concept{concept_array,array} of given size. ++ /// \effects Allocates a array of given size. + /// It is similar to \ref allocate_node() but will return `nullptr` on any failure, + /// instead of growing the arnea and possibly throwing. +- /// \returns A \concept{concept_array,array} of given size suitable aligned ++ /// \returns A array of given size suitable aligned + /// or `nullptr` in case of failure. + void* try_allocate_array(std::size_t count, std::size_t node_size) noexcept + { +@@ -221,7 +221,7 @@ namespace foonathan + return pool.allocate(count * node_size); + } + +- /// \effects Deallocates a \concept{concept_node,node} by putting it back onto the appropriate free list. ++ /// \effects Deallocates a node by putting it back onto the appropriate free list. + /// \requires \c ptr must be a result from a previous call to \ref allocate_node() with the same size on the same free list, + /// i.e. either this allocator object or a new object created by moving this to it. + void deallocate_node(void* ptr, std::size_t node_size) noexcept +@@ -229,7 +229,7 @@ namespace foonathan + pools_.get(node_size).deallocate(ptr); + } + +- /// \effects Deallocates a \concept{concept_node,node} similar to \ref deallocate_node(). ++ /// \effects Deallocates a node similar to \ref deallocate_node(). + /// But it checks if it can deallocate this memory. + /// \returns `true` if the node could be deallocated, + /// `false` otherwise. +@@ -241,7 +241,7 @@ namespace foonathan + return true; + } + +- /// \effects Deallocates an \concept{concept_array,array} by putting it back onto the free list. ++ /// \effects Deallocates an array by putting it back onto the free list. + /// \requires \c ptr must be a result from a previous call to \ref allocate_array() with the same sizes on the same free list, + /// i.e. either this allocator object or a new object created by moving this to it. + void deallocate_array(void* ptr, std::size_t count, std::size_t node_size) noexcept +@@ -249,7 +249,7 @@ namespace foonathan + pools_.get(node_size).deallocate(ptr, count * node_size); + } + +- /// \effects Deallocates a \concept{concept_array,array} similar to \ref deallocate_array(). ++ /// \effects Deallocates a array similar to \ref deallocate_array(). + /// But it checks if it can deallocate this memory. + /// \returns `true` if the array could be deallocated, + /// `false` otherwise. +@@ -263,10 +263,10 @@ namespace foonathan + + /// \effects Inserts more memory on the free list for nodes of given size. + /// It will try to put \c capacity_left bytes from the arena onto the free list defined over the \c BucketDistribution, +- /// if the arena is empty, a new memory block is requested from the \concept{concept_blockallocator,BlockAllocator} ++ /// if the arena is empty, a new memory block is requested from the BlockAllocator + /// and it will be used. +- /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} if a growth is needed. +- /// \requires \c node_size must be valid \concept{concept_node,node size} less than or equal to \ref max_node_size(), ++ /// \throws Anything thrown by the BlockAllocator if a growth is needed. ++ /// \requires \c node_size must be valid node size less than or equal to \ref max_node_size(), + /// \c capacity_left must be less than \ref next_capacity(). + void reserve(std::size_t node_size, std::size_t capacity) + { +@@ -294,7 +294,7 @@ namespace foonathan + + /// \returns The amount of memory available in the arena not inside the free lists. + /// This is the number of bytes that can be inserted into the free lists +- /// without requesting more memory from the \concept{concept_blockallocator,BlockAllocator}. ++ /// without requesting more memory from the BlockAllocator. + /// \note Array allocations may lead to a growth even if the capacity is big enough. + std::size_t capacity_left() const noexcept + { +@@ -309,7 +309,7 @@ namespace foonathan + return arena_.next_block_size(); + } + +- /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the arena. ++ /// \returns A reference to the BlockAllocator used for managing the arena. + /// \requires It is undefined behavior to move this allocator out into another object. + allocator_type& get_allocator() noexcept + { +diff --git a/include/foonathan/memory/memory_resource_adapter.hpp b/include/foonathan/memory/memory_resource_adapter.hpp +index cf58eed1f0134c5236ae20be4f095bb31244a4a1..41135bc55bedc58f4d496b0d3047b2ec5778ac18 100644 +--- a/include/foonathan/memory/memory_resource_adapter.hpp ++++ b/include/foonathan/memory/memory_resource_adapter.hpp +@@ -90,7 +90,7 @@ namespace foonathan + /// \ingroup memory_adapter + FOONATHAN_ALIAS_TEMPLATE(memory_resource, foonathan_memory_pmr::memory_resource); + +- /// Wraps a \concept{concept_rawallocator,RawAllocator} and makes it a \ref memory_resource. ++ /// Wraps a RawAllocator and makes it a \ref memory_resource. + /// \ingroup memory_adapter + template + class memory_resource_adapter +@@ -124,7 +124,7 @@ namespace foonathan + + /// \effects Allocates raw memory with given size and alignment. + /// It forwards to \c allocate_node() or \c allocate_array() depending on the size. +- /// \returns The new memory as returned by the \concept{concept_rawallocator,RawAllocator}. ++ /// \returns The new memory as returned by the RawAllocator. + /// \throws Anything thrown by the allocation function. + void* do_allocate(std::size_t bytes, std::size_t alignment) override + { +@@ -162,7 +162,7 @@ namespace foonathan + } + }; + +- /// Wraps a \ref memory_resource and makes it a \concept{concept_rawallocator,RawAllocator}. ++ /// Wraps a \ref memory_resource and makes it a RawAllocator. + /// \ingroup memory_adapter + class memory_resource_allocator + { +diff --git a/include/foonathan/memory/memory_stack.hpp b/include/foonathan/memory/memory_stack.hpp +index dc9f1226ab504546e06d471ac48bee4a1b50fcda..7f0eb56f9e628ab2e7324306a08b17d778d176cb 100644 +--- a/include/foonathan/memory/memory_stack.hpp ++++ b/include/foonathan/memory/memory_stack.hpp +@@ -92,7 +92,7 @@ namespace foonathan + }; + } // namespace detail + +- /// A stateful \concept{concept_rawallocator,RawAllocator} that provides stack-like (LIFO) allocations. ++ /// A stateful RawAllocator that provides stack-like (LIFO) allocations. + /// It uses a \ref memory_arena with a given \c BlockOrRawAllocator defaulting to \ref growing_block_allocator to allocate huge blocks + /// and saves a marker to the current top. + /// Allocation simply moves this marker by the appropriate number of bytes and returns the pointer at the old marker position, +@@ -116,7 +116,7 @@ namespace foonathan + return detail::memory_block_stack::implementation_offset() + byte_size; + } + +- /// \effects Creates it with a given initial block size and and other constructor arguments for the \concept{concept_blockallocator,BlockAllocator}. ++ /// \effects Creates it with a given initial block size and and other constructor arguments for the BlockAllocator. + /// It will allocate the first block and sets the top to its beginning. + /// \requires \c block_size must be at least \c min_block_size(1). + template +@@ -129,10 +129,10 @@ namespace foonathan + /// \effects Allocates a memory block of given size and alignment. + /// It simply moves the top marker. + /// If there is not enough space on the current memory block, +- /// a new one will be allocated by the \concept{concept_blockallocator,BlockAllocator} or taken from a cache ++ /// a new one will be allocated by the BlockAllocator or taken from a cache + /// and used for the allocation. +- /// \returns A \concept{concept_node,node} with given size and alignment. +- /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} on growth ++ /// \returns A node with given size and alignment. ++ /// \throws Anything thrown by the BlockAllocator on growth + /// or \ref bad_allocation_size if \c size is too big. + /// \requires \c size and \c alignment must be valid. + void* allocate(std::size_t size, std::size_t alignment) +@@ -160,7 +160,7 @@ namespace foonathan + /// \effects Allocates a memory block of given size and alignment, + /// similar to \ref allocate(). + /// But it does not attempt a growth if the arena is empty. +- /// \returns A \concept{concept_node,node} with given size and alignment ++ /// \returns A node with given size and alignment + /// or `nullptr` if there wasn't enough memory available. + void* try_allocate(std::size_t size, std::size_t alignment) noexcept + { +@@ -221,7 +221,7 @@ namespace foonathan + } + } + +- /// \effects \ref unwind() does not actually do any deallocation of blocks on the \concept{concept_blockallocator,BlockAllocator}, ++ /// \effects \ref unwind() does not actually do any deallocation of blocks on the BlockAllocator, + /// unused memory is stored in a cache for later reuse. + /// This function clears that cache. + void shrink_to_fit() noexcept +@@ -231,7 +231,7 @@ namespace foonathan + + /// \returns The amount of memory remaining in the current block. + /// This is the number of bytes that are available for allocation +- /// before the cache or \concept{concept_blockallocator,BlockAllocator} needs to be used. ++ /// before the cache or BlockAllocator needs to be used. + std::size_t capacity_left() const noexcept + { + return std::size_t(block_end() - stack_.top()); +@@ -246,7 +246,7 @@ namespace foonathan + return arena_.next_block_size(); + } + +- /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the arena. ++ /// \returns A reference to the BlockAllocator used for managing the arena. + /// \requires It is undefined behavior to move this allocator out into another object. + allocator_type& get_allocator() noexcept + { +diff --git a/include/foonathan/memory/new_allocator.hpp b/include/foonathan/memory/new_allocator.hpp +index 5d11038ae6fce0379c7aeddd470ea1ad4744f5b7..1d0dbe9ca584ba844dfa80b367168dda8e992471 100644 +--- a/include/foonathan/memory/new_allocator.hpp ++++ b/include/foonathan/memory/new_allocator.hpp +@@ -37,7 +37,7 @@ namespace foonathan + new_alloator_leak_checker) + } // namespace detail + +- /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using (nothrow) operator new. ++ /// A stateless RawAllocator that allocates memory using (nothrow) operator new. + /// If the operator returns \c nullptr, it behaves like \c new and loops calling \c std::new_handler, + /// but instead of throwing a \c std::bad_alloc exception, it throws \ref out_of_memory. + /// \ingroup memory_allocator +diff --git a/include/foonathan/memory/segregator.hpp b/include/foonathan/memory/segregator.hpp +index 75dad5ebbb795b91b919c2e3ac72de396a77c88e..883fd8ce723d0fcf91aebc2ff933773f237061fe 100644 +--- a/include/foonathan/memory/segregator.hpp ++++ b/include/foonathan/memory/segregator.hpp +@@ -17,7 +17,7 @@ namespace foonathan + { + namespace memory + { +- /// A \concept{concept_segregatable,Segregatable} that allocates until a maximum size. ++ /// A Segregatable that allocates until a maximum size. + /// \ingroup memory_adapter + template + class threshold_segregatable : FOONATHAN_EBO(allocator_traits::allocator_type) +@@ -76,7 +76,7 @@ namespace foonathan + std::forward(alloc)); + } + +- /// A composable \concept{concept_rawallocator,RawAllocator} that will always fail. ++ /// A composable RawAllocator that will always fail. + /// This is useful for compositioning or as last resort in \ref binary_segregator. + /// \ingroup memory_allocator + class null_allocator +@@ -116,7 +116,7 @@ namespace foonathan + } + }; + +- /// A \concept{concept_rawallocator,RawAllocator} that either uses the \concept{concept_segregatable,Segregatable} or the other `RawAllocator`. ++ /// A RawAllocator that either uses the Segregatable or the other `RawAllocator`. + /// It is a faster alternative to \ref fallback_allocator that doesn't require a composable allocator + /// and decides about the allocator to use purely with the `Segregatable` based on size and alignment. + /// \ingroup memory_adapter +@@ -133,8 +133,8 @@ namespace foonathan + using segregatable_allocator_type = typename segregatable::allocator_type; + using fallback_allocator_type = typename allocator_traits::allocator_type; + +- /// \effects Creates it by giving the \concept{concept_segregatable,Segregatable} +- /// and the \concept{concept_rawallocator,RawAllocator}. ++ /// \effects Creates it by giving the Segregatable ++ /// and the RawAllocator. + explicit binary_segregator(segregatable s, + fallback_allocator_type fallback = fallback_allocator_type()) + : detail::ebo_storage<1, fallback_allocator_type>(detail::move(fallback)), +@@ -143,7 +143,7 @@ namespace foonathan + } + + /// @{ +- /// \effects Uses the \concept{concept_segregatable,Segregatable} to decide which allocator to use. ++ /// \effects Uses the Segregatable to decide which allocator to use. + /// Then forwards to the chosen allocator. + void* allocate_node(std::size_t size, std::size_t alignment) + { +@@ -223,7 +223,7 @@ namespace foonathan + + /// @{ + /// \returns A reference to the fallback allocator. +- /// It will be used if the \concept{concept_segregator,Segregator} doesn't want the alloction. ++ /// It will be used if the Segregator doesn't want the alloction. + fallback_allocator_type& get_fallback_allocator() noexcept + { + return detail::ebo_storage<1, fallback_allocator_type>::get(); +@@ -366,10 +366,10 @@ namespace foonathan + } // namespace detail + + /// Creates multiple nested \ref binary_segregator. +- /// If you pass one type, it must be a \concept{concept_segregatable,Segregatable}. ++ /// If you pass one type, it must be a Segregatable. + /// Then the result is a \ref binary_segregator with that `Segregatable` and \ref null_allocator as fallback. + /// If you pass two types, the first one must be a `Segregatable`, +- /// the second one a \concept{concept_rawallocator,RawAllocator}. ++ /// the second one a RawAllocator. + /// Then the result is a simple \ref binary_segregator with those arguments. + /// If you pass more than one, the last one must be a `RawAllocator` all others `Segregatable`, + /// the result is `binary_segregator>`. +@@ -388,7 +388,7 @@ namespace foonathan + return detail::make_segregator(std::forward(args)...); + } + +- /// The number of \concept{concept_segregatable,Segregatable} a \ref segregator has. ++ /// The number of Segregatable a \ref segregator has. + /// \relates segregator + template + struct segregator_size +@@ -396,13 +396,13 @@ namespace foonathan + static const std::size_t value = detail::fallback_type::size; + }; + +- /// The type of the `I`th \concept{concept_segregatable,Segregatable}. ++ /// The type of the `I`th Segregatable. + /// \relates segregator + template + using segregatable_allocator_type = typename detail::segregatable_type::type; + + /// @{ +- /// \returns The `I`th \concept{concept_segregatable,Segregatable}. ++ /// \returns The `I`th Segregatable. + /// \relates segregrator + template + auto get_segregatable_allocator(binary_segregator& s) +@@ -419,13 +419,13 @@ namespace foonathan + } + /// @} + +- /// The type of the final fallback \concept{concept_rawallocator,RawAllocator}. ++ /// The type of the final fallback RawAllocator. + /// \relates segregator + template + using fallback_allocator_type = typename detail::fallback_type::type; + + /// @{ +- /// \returns The final fallback \concept{concept_rawallocator,RawAllocator}. ++ /// \returns The final fallback RawAllocator. + /// \relates segregator + template + auto get_fallback_allocator(binary_segregator& s) +diff --git a/include/foonathan/memory/smart_ptr.hpp b/include/foonathan/memory/smart_ptr.hpp +index f8508a404e9476b449b7ed5853b0dcdd65630e2f..9747a5133314db6f88a3120bd18619b09dd7b971 100644 +--- a/include/foonathan/memory/smart_ptr.hpp ++++ b/include/foonathan/memory/smart_ptr.hpp +@@ -5,7 +5,7 @@ + #define FOONATHAN_MEMORY_SMART_PTR_HPP_INCLUDED + + /// \file +-/// \c std::make_unique() / \c std::make_shared() replacement allocating memory through a \concept{concept_rawallocator,RawAllocator}. ++/// \c std::make_unique() / \c std::make_shared() replacement allocating memory through a RawAllocator. + /// \note Only available on a hosted implementation. + + #include "config.hpp" +@@ -85,7 +85,7 @@ namespace foonathan + } + } // namespace detail + +- /// A \c std::unique_ptr that deletes using a \concept{concept_rawallocator,RawAllocator}. ++ /// A \c std::unique_ptr that deletes using a RawAllocator. + /// + /// It is an alias template using \ref allocator_deleter as \c Deleter class. + /// \ingroup memory_adapter +@@ -93,7 +93,7 @@ namespace foonathan + FOONATHAN_ALIAS_TEMPLATE(unique_ptr, + std::unique_ptr>); + +- /// A \c std::unique_ptr that deletes using a \concept{concept_rawallocator,RawAllocator} and allows polymorphic types. ++ /// A \c std::unique_ptr that deletes using a RawAllocator and allows polymorphic types. + /// + /// It can only be created by converting a regular unique pointer to a pointer to a derived class, + /// and is meant to be used inside containers. +@@ -105,7 +105,7 @@ namespace foonathan + unique_base_ptr, + std::unique_ptr>); + +- /// Creates a \c std::unique_ptr using a \concept{concept_rawallocator,RawAllocator} for the allocation. ++ /// Creates a \c std::unique_ptr using a RawAllocator for the allocation. + /// \effects Allocates memory for the given type using the allocator + /// and creates a new object inside it passing the given arguments to its constructor. + /// \returns A \c std::unique_ptr owning that memory. +@@ -122,7 +122,7 @@ namespace foonathan + detail::forward(args)...); + } + +- /// Creates a \c std::unique_ptr using a type-erased \concept{concept_rawallocator,RawAllocator} for the allocation. ++ /// Creates a \c std::unique_ptr using a type-erased RawAllocator for the allocation. + /// It is the same as the other overload but stores the reference to the allocator type-erased inside the \c std::unique_ptr. + /// \effects Allocates memory for the given type using the allocator + /// and creates a new object inside it passing the given arguments to its constructor. +@@ -141,7 +141,7 @@ namespace foonathan + detail::forward(args)...); + } + +- /// Creates a \c std::unique_ptr owning an array using a \concept{concept_rawallocator,RawAllocator} for the allocation. ++ /// Creates a \c std::unique_ptr owning an array using a RawAllocator for the allocation. + /// \effects Allocates memory for an array of given size and value initializes each element inside of it. + /// \returns A \c std::unique_ptr owning that array. + /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, +@@ -158,7 +158,7 @@ namespace foonathan + detail::forward(alloc))); + } + +- /// Creates a \c std::unique_ptr owning an array using a type-erased \concept{concept_rawallocator,RawAllocator} for the allocation. ++ /// Creates a \c std::unique_ptr owning an array using a type-erased RawAllocator for the allocation. + /// It is the same as the other overload but stores the reference to the allocator type-erased inside the \c std::unique_ptr. + /// \effects Allocates memory for an array of given size and value initializes each element inside of it. + /// \returns A \c std::unique_ptr with a type-erased allocator reference owning that array. +@@ -177,7 +177,7 @@ namespace foonathan + alloc))); + } + +- /// Creates a \c std::shared_ptr using a \concept{concept_rawallocator,RawAllocator} for the allocation. ++ /// Creates a \c std::shared_ptr using a RawAllocator for the allocation. + /// It is similar to \c std::allocate_shared but uses a \c RawAllocator (and thus also supports any \c Allocator). + /// \effects Calls \ref std_allocator::make_std_allocator to wrap the allocator and forwards to \c std::allocate_shared. + /// \returns A \c std::shared_ptr created using \c std::allocate_shared. +diff --git a/include/foonathan/memory/static_allocator.hpp b/include/foonathan/memory/static_allocator.hpp +index 580fa2be8f5b1a291d1864558cb75328c4baff3f..472bdeb99fdbfc973e614ffbe6903a50a1193c70 100644 +--- a/include/foonathan/memory/static_allocator.hpp ++++ b/include/foonathan/memory/static_allocator.hpp +@@ -39,7 +39,7 @@ namespace foonathan + + struct allocator_info; + +- /// A stateful \concept{concept_rawallocator,RawAllocator} that uses a fixed sized storage for the allocations. ++ /// A stateful RawAllocator that uses a fixed sized storage for the allocations. + /// It works on a \ref static_allocator_storage and uses its memory for all allocations. + /// Deallocations are not supported, memory cannot be marked as freed.
+ /// \note It is not allowed to share an \ref static_allocator_storage between multiple \ref static_allocator objects. +@@ -60,13 +60,13 @@ namespace foonathan + { + } + +- /// \effects A \concept{concept_rawallocator,RawAllocator} allocation function. ++ /// \effects A RawAllocator allocation function. + /// It uses the specified \ref static_allocator_storage. +- /// \returns A pointer to a \concept{concept_node,node}, it will never be \c nullptr. ++ /// \returns A pointer to a node, it will never be \c nullptr. + /// \throws An exception of type \ref out_of_memory or whatever is thrown by its handler if the storage is exhausted. + void* allocate_node(std::size_t size, std::size_t alignment); + +- /// \effects A \concept{concept_rawallocator,RawAllocator} deallocation function. ++ /// \effects A RawAllocator deallocation function. + /// It does nothing, deallocation is not supported by this allocator. + void deallocate_node(void*, std::size_t, std::size_t) noexcept {} + +@@ -96,7 +96,7 @@ namespace foonathan + + struct memory_block; + +- /// A \concept{concept_blockallocator,BlockAllocator} that allocates the blocks from a fixed size storage. ++ /// A BlockAllocator that allocates the blocks from a fixed size storage. + /// It works on a \ref static_allocator_storage and uses it for all allocations, + /// deallocations are only allowed in reversed order which is guaranteed by \ref memory_arena. + /// \note It is not allowed to share an \ref static_allocator_storage between multiple \ref static_allocator objects. +diff --git a/include/foonathan/memory/std_allocator.hpp b/include/foonathan/memory/std_allocator.hpp +index 33b2f5489b290f9cf3d3ad710373e2f982928f12..a465c7ad38d481e0cff93ea4f8892fd4dc58f920 100644 +--- a/include/foonathan/memory/std_allocator.hpp ++++ b/include/foonathan/memory/std_allocator.hpp +@@ -43,7 +43,7 @@ namespace foonathan + auto propagate_on_container_copy_assignment(min_concept) -> std::true_type; + } // namespace traits_detail + +- /// Controls the propagation of a \ref std_allocator for a certain \concept{concept_rawallocator,RawAllocator}. ++ /// Controls the propagation of a \ref std_allocator for a certain RawAllocator. + /// \ingroup memory_adapter + template + struct propagation_traits +@@ -67,7 +67,7 @@ namespace foonathan + } + }; + +- /// Wraps a \concept{concept_rawallocator,RawAllocator} and makes it a "normal" \c Allocator. ++ /// Wraps a RawAllocator and makes it a "normal" \c Allocator. + /// It allows using a \c RawAllocator anywhere a \c Allocator is required. + /// \ingroup memory_adapter + template +@@ -186,7 +186,7 @@ namespace foonathan + } + + //=== allocation/deallocation ===// +- /// \effects Allocates memory using the underlying \concept{concept_rawallocator,RawAllocator}. ++ /// \effects Allocates memory using the underlying RawAllocator. + /// If \c n is \c 1, it will call allocate_node(sizeof(T), alignof(T)), + /// otherwise allocate_array(n, sizeof(T), alignof(T)). + /// \returns A pointer to a memory block suitable for \c n objects of type \c T. +@@ -196,7 +196,7 @@ namespace foonathan + return static_cast(allocate_impl(is_any{}, n)); + } + +- /// \effects Deallcoates memory using the underlying \concept{concept_rawallocator,RawAllocator}. ++ /// \effects Deallcoates memory using the underlying RawAllocator. + /// It will forward to the deallocation function in the same way as in \ref allocate(). + /// \requires The pointer must come from a previous call to \ref allocate() with the same \c n on this object or any copy of it. + void deallocate(pointer p, size_type n) noexcept +@@ -341,7 +341,7 @@ namespace foonathan + return {detail::forward(allocator)}; + } + +- /// An alias template for \ref std_allocator using a type-erased \concept{concept_rawallocator,RawAllocator}. ++ /// An alias template for \ref std_allocator using a type-erased RawAllocator. + /// This is the same as using a \ref std_allocator with the tag type \ref any_allocator. + /// The implementation is optimized to call fewer virtual functions. + /// \ingroup memory_adapter +diff --git a/include/foonathan/memory/temporary_allocator.hpp b/include/foonathan/memory/temporary_allocator.hpp +index 135d250bc15ee074a22b3c210b541dcff98e6d83..d8f9f18795568462bbc27dba6581585c537f5742 100644 +--- a/include/foonathan/memory/temporary_allocator.hpp ++++ b/include/foonathan/memory/temporary_allocator.hpp +@@ -209,7 +209,7 @@ namespace foonathan + temporary_stack& get_temporary_stack( + std::size_t initial_size = temporary_stack_initializer::default_stack_size); + +- /// A stateful \concept{concept_rawallocator,RawAllocator} that handles temporary allocations. ++ /// A stateful RawAllocator that handles temporary allocations. + /// It works similar to \c alloca() but uses a seperate \ref memory_stack for the allocations, + /// instead of the actual program stack. + /// This avoids the stack overflow error and is portable, +diff --git a/include/foonathan/memory/threading.hpp b/include/foonathan/memory/threading.hpp +index 52b3998b2c7b7ee5c4b0def5857ddaf6f65e8435..7fadd8ae80b28a3ff2ae564fba4555d0d2745f63 100644 +--- a/include/foonathan/memory/threading.hpp ++++ b/include/foonathan/memory/threading.hpp +@@ -35,7 +35,7 @@ namespace foonathan + void unlock() noexcept {} + }; + +- /// Specifies whether or not a \concept{concept_rawallocator,RawAllocator} is thread safe as-is. ++ /// Specifies whether or not a RawAllocator is thread safe as-is. + /// This allows to use \ref no_mutex as an optimization. + /// Note that stateless allocators are implictly thread-safe. + /// Specialize it only for your own stateful allocators. +diff --git a/include/foonathan/memory/tracking.hpp b/include/foonathan/memory/tracking.hpp +index 222e6105bf35d884fa4e472f077ebf58a721894a..80d509af506b0b173238d2beb12570c9b9530090 100644 +--- a/include/foonathan/memory/tracking.hpp ++++ b/include/foonathan/memory/tracking.hpp +@@ -69,11 +69,11 @@ namespace foonathan + }; + } // namespace detail + +- /// A \concept{concept_blockallocator,BlockAllocator} adapter that tracks another allocator using a \concept{concept_tracker,tracker}. +- /// It wraps another \concept{concept_blockallocator,BlockAllocator} and calls the tracker function before forwarding to it. +- /// The class can then be used anywhere a \concept{concept_blockallocator,BlockAllocator} is required and the memory usage will be tracked.
++ /// A BlockAllocator adapter that tracks another allocator using a tracker. ++ /// It wraps another BlockAllocator and calls the tracker function before forwarding to it. ++ /// The class can then be used anywhere a BlockAllocator is required and the memory usage will be tracked.
+ /// It will only call the on_allocator_growth() and on_allocator_shrinking() tracking functions, +- /// since a \concept{concept_blockallocator,BlockAllocator} is normally used inside higher allocators only. ++ /// since a BlockAllocator is normally used inside higher allocators only. + /// \ingroup memory_adapter + template + class tracked_block_allocator +@@ -84,7 +84,7 @@ namespace foonathan + using tracker = Tracker; + + /// @{ +- /// \effects Creates it by giving it a \concept{concept_tracker,tracker} and the tracked \concept{concept_rawallocator,RawAllocator}. ++ /// \effects Creates it by giving it a tracker and the tracked RawAllocator. + /// It will embed both objects. + explicit tracked_block_allocator(tracker t = {}) noexcept : tracker(detail::move(t)) {} + +@@ -160,10 +160,10 @@ namespace foonathan + detail::deeply_tracked_block_allocator>); + +- /// A \concept{concept_rawallocator,RawAllocator} adapter that tracks another allocator using a \concept{concept_tracker,tracker}. +- /// It wraps another \concept{concept_rawallocator,RawAllocator} and calls the tracker function before forwarding to it. +- /// The class can then be used anywhere a \concept{concept_rawallocator,RawAllocator} is required and the memory usage will be tracked.
+- /// If the \concept{concept_rawallocator,RawAllocator} uses \ref deeply_tracked_block_allocator as \concept{concept_blockallocator,BlockAllocator}, ++ /// A RawAllocator adapter that tracks another allocator using a tracker. ++ /// It wraps another RawAllocator and calls the tracker function before forwarding to it. ++ /// The class can then be used anywhere a RawAllocator is required and the memory usage will be tracked.
++ /// If the RawAllocator uses \ref deeply_tracked_block_allocator as BlockAllocator, + /// it will also track growth and shrinking of the allocator. + /// \ingroup memory_adapter + template +@@ -181,7 +181,7 @@ namespace foonathan + || !std::is_empty::value>; + + /// @{ +- /// \effects Creates it by giving it a \concept{concept_tracker,tracker} and the tracked \concept{concept_rawallocator,RawAllocator}. ++ /// \effects Creates it by giving it a tracker and the tracked RawAllocator. + /// It will embed both objects. + /// \note This will never call the Tracker::on_allocator_growth() function. + explicit tracked_allocator(tracker t = {}) noexcept +@@ -350,7 +350,7 @@ namespace foonathan + /// @} + }; + +- /// \effects Takes a \concept{concept_rawallocator,RawAllocator} and wraps it with a \concept{concept_tracker,tracker}. ++ /// \effects Takes a RawAllocator and wraps it with a tracker. + /// \returns A \ref tracked_allocator with the corresponding parameters forwarded to the constructor. + /// \relates tracked_allocator + template +@@ -403,16 +403,16 @@ namespace foonathan + RawAllocator, deeply_tracked_block_allocator_for>::type; + } // namespace detail + +- /// A \ref tracked_allocator that has rebound any \concept{concept_blockallocator,BlockAllocator} to the corresponding \ref deeply_tracked_block_allocator. ++ /// A \ref tracked_allocator that has rebound any BlockAllocator to the corresponding \ref deeply_tracked_block_allocator. + /// This makes it a deeply tracked allocator.
+- /// It replaces each template argument of the given \concept{concept_rawallocator,RawAllocator} for which \ref is_block_allocator or \ref is_raw_allocator is \c true with a \ref deeply_tracked_block_allocator. ++ /// It replaces each template argument of the given RawAllocator for which \ref is_block_allocator or \ref is_raw_allocator is \c true with a \ref deeply_tracked_block_allocator. + /// \ingroup memory_adapter + template + FOONATHAN_ALIAS_TEMPLATE( + deeply_tracked_allocator, + tracked_allocator>); + +- /// \effects Takes a \concept{concept_rawallocator,RawAllocator} and deeply wraps it with a \concept{concept_tracker,tracker}. ++ /// \effects Takes a RawAllocator and deeply wraps it with a tracker. + /// \returns A \ref deeply_tracked_allocator with the corresponding parameters forwarded to the constructor. + /// \relates deeply_tracked_allocator + template +diff --git a/include/foonathan/memory/virtual_memory.hpp b/include/foonathan/memory/virtual_memory.hpp +index 35f7ccd54fdda08c504696b0719d16ec27d6c9e9..c1d3cbc882bf29e023770c9b8699c655f4119a64 100644 +--- a/include/foonathan/memory/virtual_memory.hpp ++++ b/include/foonathan/memory/virtual_memory.hpp +@@ -76,7 +76,7 @@ namespace foonathan + /// \ingroup memory_allocator + void virtual_memory_decommit(void* memory, std::size_t no_pages) noexcept; + +- /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using the virtual memory allocation functions. ++ /// A stateless RawAllocator that allocates memory using the virtual memory allocation functions. + /// It does not prereserve any memory and will always reserve and commit combined. + /// \ingroup memory_allocator + class virtual_memory_allocator +@@ -94,17 +94,17 @@ namespace foonathan + return *this; + } + +- /// \effects A \concept{concept_rawallocator,RawAllocator} allocation function. ++ /// \effects A RawAllocator allocation function. + /// It uses \ref virtual_memory_reserve followed by \ref virtual_memory_commit for the allocation. + /// The number of pages allocated will be the minimum to hold \c size continuous bytes, + /// i.e. \c size will be rounded up to the next multiple. + /// If debug fences are activated, one additional page before and after the memory will be allocated. +- /// \returns A pointer to a \concept{concept_node,node}, it will never be \c nullptr. ++ /// \returns A pointer to a node, it will never be \c nullptr. + /// It will always be aligned on a fence boundary, regardless of the alignment parameter. + /// \throws An exception of type \ref out_of_memory or whatever is thrown by its handler if the allocation fails. + void* allocate_node(std::size_t size, std::size_t alignment); + +- /// \effects A \concept{concept_rawallocator,RawAllocator} deallocation function. ++ /// \effects A RawAllocator deallocation function. + /// It calls \ref virtual_memory_decommit followed by \ref virtual_memory_release for the deallocation. + void deallocate_node(void* node, std::size_t size, std::size_t alignment) noexcept; + +@@ -122,7 +122,7 @@ namespace foonathan + struct memory_block; + struct allocator_info; + +- /// A \concept{concept_blockallocator,BlockAllocator} that reserves virtual memory and commits it part by part. ++ /// A BlockAllocator that reserves virtual memory and commits it part by part. + /// It is similar to \ref memory_stack but does not support growing and uses virtual memory, + /// also meant for big blocks not small allocations. + /// \ingroup memory_allocator diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/aligned_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/aligned_allocator.hpp index 3083a4029e..dce436fc4f 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/aligned_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/aligned_allocator.hpp @@ -18,9 +18,9 @@ namespace wpi { namespace memory { - /// A \concept{concept_rawallocator,RawAllocator} adapter that ensures a minimum alignment. + /// A RawAllocator adapter that ensures a minimum alignment. /// It adjusts the alignment value so that it is always larger than the minimum and forwards to the specified allocator. - /// \ingroup adapter + /// \ingroup memory_adapter template class aligned_allocator : WPI_EBO(allocator_traits::allocator_type) { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_storage.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_storage.hpp index dc9067222a..96fc46e589 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_storage.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_storage.hpp @@ -85,10 +85,10 @@ namespace wpi } } // namespace detail - /// A \concept{concept_rawallocator,RawAllocator} that stores another allocator. - /// The \concept{concept_storagepolicy,StoragePolicy} defines the allocator type being stored and how it is stored. + /// A RawAllocator that stores another allocator. + /// The StoragePolicy defines the allocator type being stored and how it is stored. /// The \c Mutex controls synchronization of the access. - /// \ingroup storage + /// \ingroup memory_storage template class allocator_storage : WPI_EBO(StoragePolicy, @@ -317,14 +317,14 @@ namespace wpi /// Tag type that enables type-erasure in \ref reference_storage. /// It can be used everywhere a \ref allocator_reference is used internally. - /// \ingroup storage + /// \ingroup memory_storage struct any_allocator { }; - /// A \concept{concept_storagepolicy,StoragePolicy} that stores the allocator directly. + /// A StoragePolicy that stores the allocator directly. /// It embeds the allocator inside it, i.e. moving the storage policy will move the allocator. - /// \ingroup storage + /// \ingroup memory_storage template class direct_storage : WPI_EBO(allocator_traits::allocator_type) { @@ -379,9 +379,9 @@ namespace wpi }; /// An alias template for \ref allocator_storage using the \ref direct_storage policy without a mutex. - /// It has the effect of giving any \concept{concept_rawallocator,RawAllocator} the interface with all member functions, + /// It has the effect of giving any RawAllocator the interface with all member functions, /// avoiding the need to wrap it inside the \ref allocator_traits. - /// \ingroup storage + /// \ingroup memory_storage template WPI_ALIAS_TEMPLATE(allocator_adapter, allocator_storage, no_mutex>); @@ -399,7 +399,7 @@ namespace wpi /// It has a similar effect as \ref allocator_adapter but performs synchronization. /// The \c Mutex will default to \c std::mutex if threading is supported, /// otherwise there is no default. -/// \ingroup storage +/// \ingroup memory_storage #if WPI_HOSTED_IMPLEMENTATION template WPI_ALIAS_TEMPLATE(thread_safe_allocator, @@ -521,26 +521,26 @@ namespace wpi }; } // namespace detail - /// Specifies whether or not a \concept{concept_rawallocator,RawAllocator} has shared semantics. + /// Specifies whether or not a RawAllocator has shared semantics. /// It is shared, if - like \ref allocator_reference - if multiple objects refer to the same internal allocator and if it can be copied. /// This sharing is stateful, however, stateless allocators are not considered shared in the meaning of this traits.
/// If a \c RawAllocator is shared, it will be directly embedded inside \ref reference_storage since it already provides \ref allocator_reference like semantics, so there is no need to add them manually,
/// Specialize it for your own types, if they provide sharing semantics and can be copied. /// They also must provide an `operator==` to check whether two allocators refer to the same shared one. /// \note This makes no guarantees about the lifetime of the shared object, the sharing allocators can either own or refer to a shared object. - /// \ingroup storage + /// \ingroup memory_storage template struct is_shared_allocator : std::false_type { }; - /// A \concept{concept_storagepolicy,StoragePolicy} that stores a reference to an allocator. + /// A StoragePolicy that stores a reference to an allocator. /// For stateful allocators it only stores a pointer to an allocator object and copying/moving only copies the pointer. /// For stateless allocators it does not store anything, an allocator will be constructed as needed. /// For allocators that are already shared (determined through \ref is_shared_allocator) it will store the allocator type directly. /// \note It does not take ownership over the allocator in the stateful case, the user has to ensure that the allocator object stays valid. /// In the other cases the lifetime does not matter. - /// \ingroup storage + /// \ingroup memory_storage template class reference_storage #ifndef DOXYGEN @@ -611,7 +611,7 @@ namespace wpi /// Specialization of the class template \ref reference_storage that is type-erased. /// It is triggered by the tag type \ref any_allocator. /// The specialization can store a reference to any allocator type. - /// \ingroup storage + /// \ingroup memory_storage template <> class reference_storage { @@ -711,7 +711,7 @@ namespace wpi public: using allocator_type = WPI_IMPL_DEFINED(base_allocator); - /// \effects Creates it from a reference to any stateful \concept{concept_rawallocator,RawAllocator}. + /// \effects Creates it from a reference to any stateful RawAllocator. /// It will store a pointer to this allocator object. /// \note The user has to take care that the lifetime of the reference does not exceed the allocator lifetime. template @@ -723,7 +723,7 @@ namespace wpi ::new (static_cast(&storage_)) basic_allocator(alloc); } - // \effects Creates it from any stateless \concept{concept_rawallocator,RawAllocator}. + // \effects Creates it from any stateless RawAllocator. /// It will not store anything, only creates the allocator as needed. /// \requires The \c RawAllocator is stateless. template @@ -771,7 +771,7 @@ namespace wpi /// \returns A reference to the allocator. /// The actual type is implementation-defined since it is the base class used in the type-erasure, - /// but it provides the full \concept{concept_rawallocator,RawAllocator} member functions. + /// but it provides the full RawAllocator member functions. /// \note There is no way to access any custom member functions of the allocator type. allocator_type& get_allocator() const noexcept { @@ -894,7 +894,7 @@ namespace wpi /// An alias template for \ref allocator_storage using the \ref reference_storage policy. /// It will store a reference to the given allocator type. The tag type \ref any_allocator enables type-erasure. /// Wrap the allocator in a \ref thread_safe_allocator if you want thread safety. - /// \ingroup storage + /// \ingroup memory_storage template WPI_ALIAS_TEMPLATE(allocator_reference, allocator_storage, no_mutex>); @@ -909,14 +909,14 @@ namespace wpi } /// An alias for the \ref reference_storage specialization using type-erasure. - /// \ingroup storage + /// \ingroup memory_storage using any_reference_storage = reference_storage; /// An alias for \ref allocator_storage using the \ref any_reference_storage. - /// It will store a reference to any \concept{concept_rawallocator,RawAllocator}. + /// It will store a reference to any RawAllocator. /// This is the same as passing the tag type \ref any_allocator to the alias \ref allocator_reference. /// Wrap the allocator in a \ref thread_safe_allocator if you want thread safety. - /// \ingroup storage + /// \ingroup memory_storage using any_allocator_reference = allocator_storage; /// \returns A new \ref any_allocator_reference object by forwarding the allocator to the constructor. diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_traits.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_traits.hpp index 0e23c638a2..9bd92a0442 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_traits.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/allocator_traits.hpp @@ -50,11 +50,11 @@ namespace wpi }; } // namespace detail - /// Traits class that checks whether or not a standard \c Allocator can be used as \concept{concept_rawallocator,RawAllocator}. + /// Traits class that checks whether or not a standard \c Allocator can be used as RawAllocator. /// It checks the existence of a custom \c construct(), \c destroy() function, if provided, /// it cannot be used since it would not be called.
/// Specialize it for custom \c Allocator types to override this check. - /// \ingroup core + /// \ingroup memory_core template struct allocator_is_raw_allocator : WPI_EBO(detail::check_standard_allocator::valid) @@ -62,7 +62,7 @@ namespace wpi }; /// Specialization of \ref allocator_is_raw_allocator that allows \c std::allocator again. - /// \ingroup core + /// \ingroup memory_core template struct allocator_is_raw_allocator> : std::true_type { @@ -283,10 +283,10 @@ namespace wpi } } // namespace traits_detail - /// The default specialization of the allocator_traits for a \concept{concept_rawallocator,RawAllocator}. + /// The default specialization of the allocator_traits for a RawAllocator. /// See the last link for the requirements on types that do not specialize this class and the interface documentation. /// Any specialization must provide the same interface. - /// \ingroup core + /// \ingroup memory_core template class allocator_traits { @@ -408,9 +408,9 @@ namespace wpi }; } // namespace detail - /// Traits that check whether a type models concept \concept{concept_rawallocator,RawAllocator}.
+ /// Traits that check whether a type models concept RawAllocator.
/// It must either provide the necessary functions for the default traits specialization or has specialized it. - /// \ingroup core + /// \ingroup memory_core template struct is_raw_allocator : detail::is_raw_allocator class composable_allocator_traits { @@ -586,9 +586,9 @@ namespace wpi }; } // namespace detail - /// Traits that check whether a type models concept \concept{concept_rawallocator,ComposableAllocator}.
- /// It must be a \concept{concept_rawallocator,RawAllocator} and either provide the necessary functions for the default traits specialization or has specialized it. - /// \ingroup core + /// Traits that check whether a type models concept ComposableAllocator.
+ /// It must be a RawAllocator and either provide the necessary functions for the default traits specialization or has specialized it. + /// \ingroup memory_core template struct is_composable_allocator : detail::is_composable_allocatorwpi::memory. /// If \c false, a namespace alias namespace memory = wpi::memory is automatically inserted into each header, /// allowing to qualify everything with wpi::. /// \note This option breaks in combination with using using namespace wpi;. -/// \ingroup core +/// \ingroup memory_core #define WPI_MEMORY_NAMESPACE_PREFIX 1 /// The mode of the automatic \ref wpi::memory::temporary_stack creation. @@ -140,7 +140,7 @@ /// requires managing it through the \ref wpi::memory::temporary_stack_initializer. /// Set to `0` to disable the per-thread stack completely. /// \ref wpi::memory::get_temporary_stack() will abort the program upon call. -/// \ingroup allocator +/// \ingroup memory_allocator #define WPI_MEMORY_TEMPORARY_STACK_MODE 2 #endif diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/container.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/container.hpp index 8f8eee563a..5c7efac99d 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/container.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/container.hpp @@ -5,7 +5,7 @@ #define WPI_MEMORY_CONTAINER_HPP_INCLUDED /// \file -/// Aliasas for STL containers using a certain \concept{concept_rawallocator,RawAllocator}. +/// Aliasas for STL containers using a certain RawAllocator. /// \note Only available on a hosted implementation. #include "config.hpp" @@ -36,11 +36,11 @@ namespace wpi { namespace memory { - /// \ingroup adapter + /// \ingroup memory_adapter /// @{ /// Alias template for an STL container that uses a certain - /// \concept{concept_rawallocator,RawAllocator}. It is just a shorthand for a passing in the \c + /// RawAllocator. It is just a shorthand for a passing in the \c /// RawAllocator wrapped in a \ref wpi::memory::std_allocator. template WPI_ALIAS_TEMPLATE(vector, std::vector>); @@ -212,8 +212,8 @@ namespace wpi /// @{ /// Convenience function to create a container adapter using a certain - /// \concept{concept_rawallocator,RawAllocator}. \returns An empty adapter with an - /// implementation container using a reference to a given allocator. \ingroup adapter + /// RawAllocator. \returns An empty adapter with an + /// implementation container using a reference to a given allocator. \ingroup memory_adapter template > std::stack make_stack(RawAllocator& allocator) { @@ -271,7 +271,7 @@ namespace wpi #endif #else - /// \ingroup adapter + /// \ingroup memory_adapter /// @{ /// Contains the node size of a node based STL container with a specific type. @@ -355,7 +355,7 @@ namespace wpi #if !defined(WPI_MEMORY_NO_NODE_SIZE) /// The node size required by \ref allocate_shared. /// \note This is similar to \ref shared_ptr_node_size but takes a - /// \concept{concept_rawallocator,RawAllocator} instead. + /// RawAllocator instead. template struct allocate_shared_node_size : shared_ptr_node_size> { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/debugging.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/debugging.hpp index 580696a906..ea95dae9bd 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/debugging.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/debugging.hpp @@ -18,7 +18,7 @@ namespace wpi /// The magic values that are used for debug filling. /// If \ref WPI_MEMORY_DEBUG_FILL is \c true, memory will be filled to help detect use-after-free or missing initialization errors. /// These are the constants for the different types. - /// \ingroup core + /// \ingroup memory_core enum class debug_magic : unsigned char { /// Marks internal memory used by the allocator - "allocated block". @@ -47,19 +47,19 @@ namespace wpi /// It must not throw any exceptions since it is called in the cleanup process. /// \defaultbe On a hosted implementation it logs the leak to \c stderr and returns, continuing execution. /// On a freestanding implementation it does nothing. - /// \ingroup core + /// \ingroup memory_core using leak_handler = void (*)(const allocator_info& info, std::ptrdiff_t amount); /// Exchanges the \ref leak_handler. /// \effects Sets \c h as the new \ref leak_handler in an atomic operation. /// A \c nullptr sets the default \ref leak_handler. /// \returns The previous \ref leak_handler. This is never \c nullptr. - /// \ingroup core + /// \ingroup memory_core leak_handler set_leak_handler(leak_handler h); /// Returns the \ref leak_handler. /// \returns The current \ref leak_handler. This is never \c nullptr. - /// \ingroup core + /// \ingroup memory_core leak_handler get_leak_handler(); /// The type of the handler called when an invalid pointer is passed to a deallocation function. @@ -69,19 +69,19 @@ namespace wpi /// It must not throw any exceptions since it might be called in the cleanup process. /// \defaultbe On a hosted implementation it logs the information to \c stderr and calls \c std::abort(). /// On a freestanding implementation it only calls \c std::abort(). - /// \ingroup core + /// \ingroup memory_core using invalid_pointer_handler = void (*)(const allocator_info& info, const void* ptr); /// Exchanges the \ref invalid_pointer_handler. /// \effects Sets \c h as the new \ref invalid_pointer_handler in an atomic operation. /// A \c nullptr sets the default \ref invalid_pointer_handler. /// \returns The previous \ref invalid_pointer_handler. This is never \c nullptr. - /// \ingroup core + /// \ingroup memory_core invalid_pointer_handler set_invalid_pointer_handler(invalid_pointer_handler h); /// Returns the \ref invalid_pointer_handler. /// \returns The current \ref invalid_pointer_handler. This is never \c nullptr. - /// \ingroup core + /// \ingroup memory_core invalid_pointer_handler get_invalid_pointer_handler(); /// The type of the handler called when a buffer under/overflow is detected. @@ -92,7 +92,7 @@ namespace wpi /// It must not throw any exceptions since it me be called in the cleanup process. /// \defaultbe On a hosted implementation it logs the information to \c stderr and calls \c std::abort(). /// On a freestanding implementation it only calls \c std::abort(). - /// \ingroup core + /// \ingroup memory_core using buffer_overflow_handler = void (*)(const void* memory, std::size_t size, const void* write_ptr); @@ -100,12 +100,12 @@ namespace wpi /// \effects Sets \c h as the new \ref buffer_overflow_handler in an atomic operation. /// A \c nullptr sets the default \ref buffer_overflow_handler. /// \returns The previous \ref buffer_overflow_handler. This is never \c nullptr. - /// \ingroup core + /// \ingroup memory_core buffer_overflow_handler set_buffer_overflow_handler(buffer_overflow_handler h); /// Returns the \ref buffer_overflow_handler. /// \returns The current \ref buffer_overflow_handler. This is never \c nullptr. - /// \ingroup core + /// \ingroup memory_core buffer_overflow_handler get_buffer_overflow_handler(); } // namespace memory } // namespace wpi diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/default_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/default_allocator.hpp index 4d78abb666..da46577829 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/default_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/default_allocator.hpp @@ -21,14 +21,14 @@ namespace wpi { namespace memory { - /// The default \concept{concept_rawallocator,RawAllocator} that will be used as \concept{concept_blockallocator,BlockAllocator} in memory arenas. + /// The default RawAllocator that will be used as BlockAllocator in memory arenas. /// Arena allocators like \ref memory_stack or \ref memory_pool allocate memory by subdividing a huge block. - /// They get a \concept{concept_blockallocator,BlockAllocator} that will be used for their internal allocation, + /// They get a BlockAllocator that will be used for their internal allocation, /// this type is the default value. /// \requiredbe Its type can be changed via the CMake option \c WPI_MEMORY_DEFAULT_ALLCOATOR, /// but it must be one of the following: \ref heap_allocator, \ref new_allocator, \ref malloc_allocator, \ref static_allocator, \ref virtual_memory_allocator. /// \defaultbe The default is \ref heap_allocator. - /// \ingroup allocator + /// \ingroup memory_allocator using default_allocator = WPI_IMPL_DEFINED(WPI_MEMORY_IMPL_DEFAULT_ALLOCATOR); } // namespace memory } // namespace wpi diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/deleter.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/deleter.hpp index dd0298bfc3..6e6e937e50 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/deleter.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/deleter.hpp @@ -5,7 +5,7 @@ #define WPI_MEMORY_DELETER_HPP_INCLUDED /// \file -/// \c Deleter classes using a \concept{concept_rawallocator,RawAllocator}. +/// \c Deleter classes using a RawAllocator. #include @@ -17,10 +17,10 @@ namespace wpi { namespace memory { - /// A deleter class that deallocates the memory through a specified \concept{concept_rawallocator,RawAllocator}. + /// A deleter class that deallocates the memory through a specified RawAllocator. /// /// It deallocates memory for a specified type but does not call its destructors. - /// \ingroup adapter + /// \ingroup memory_adapter template class allocator_deallocator : WPI_EBO(allocator_reference) { @@ -63,7 +63,7 @@ namespace wpi /// Specialization of \ref allocator_deallocator for array types. /// Otherwise the same behavior. - /// \ingroup adapter + /// \ingroup memory_adapter template class allocator_deallocator : WPI_EBO(allocator_reference) @@ -116,10 +116,10 @@ namespace wpi std::size_t size_; }; - /// A deleter class that deallocates the memory of a derived type through a specified \concept{concept_rawallocator,RawAllocator}. + /// A deleter class that deallocates the memory of a derived type through a specified RawAllocator. /// /// It can only be created from a \ref allocator_deallocator and thus must only be used for smart pointers initialized by derived-to-base conversion of the pointer. - /// \ingroup adapter + /// \ingroup memory_adapter template class allocator_polymorphic_deallocator : WPI_EBO(allocator_reference) { @@ -159,7 +159,7 @@ namespace wpi /// Similar to \ref allocator_deallocator but calls the destructors of the object. /// Otherwise behaves the same. - /// \ingroup adapter + /// \ingroup memory_adapter template class allocator_deleter : WPI_EBO(allocator_reference) { @@ -203,7 +203,7 @@ namespace wpi /// Specialization of \ref allocator_deleter for array types. /// Otherwise the same behavior. - /// \ingroup adapter + /// \ingroup memory_adapter template class allocator_deleter : WPI_EBO(allocator_reference) @@ -260,7 +260,7 @@ namespace wpi /// Similar to \ref allocator_polymorphic_deallocator but calls the destructors of the object. /// Otherwise behaves the same. /// \note It has a relatively high space overhead, so only use it if you have to. - /// \ingroup adapter + /// \ingroup memory_adapter template class allocator_polymorphic_deleter : WPI_EBO(allocator_reference) { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/error.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/error.hpp index 3d2f2fae37..b7ca2b43c4 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/error.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/error.hpp @@ -18,7 +18,7 @@ namespace wpi { /// Contains information about an allocator. /// It can be used for logging in the various handler functions. - /// \ingroup core + /// \ingroup memory_core struct allocator_info { /// The name of the allocator. @@ -60,7 +60,7 @@ namespace wpi /// It is derived from \c std::bad_alloc. /// This can happen if a low level allocation function like \c std::malloc() runs out of memory. /// Throwing can be prohibited by the handler function. - /// \ingroup core + /// \ingroup memory_core class out_of_memory : public std::bad_alloc { public: @@ -116,7 +116,7 @@ namespace wpi /// thrown when a low-level allocator with a fixed size runs out of memory. /// For example, thrown by \ref fixed_block_allocator or \ref static_allocator.
/// It is derived from \ref out_of_memory but does not provide its own handler. - /// \ingroup core + /// \ingroup memory_core class out_of_fixed_memory : public out_of_memory { public: @@ -142,7 +142,7 @@ namespace wpi /// since it always depends on fence memory, alignment buffer and the like. /// \note A user should only \c catch for \c bad_allocation_size, not the derived classes. /// \note Most checks will only be done if \ref WPI_MEMORY_CHECK_ALLOCATION_SIZE is \c true. - /// \ingroup core + /// \ingroup memory_core class bad_allocation_size : public std::bad_alloc { public: @@ -206,7 +206,7 @@ namespace wpi /// The exception class thrown when the node size exceeds the supported maximum, /// i.e. it is bigger than \c max_node_size(). /// It is derived from \ref bad_allocation_size but does not override the handler. - /// \ingroup core + /// \ingroup memory_core class bad_node_size : public bad_allocation_size { public: @@ -224,7 +224,7 @@ namespace wpi /// The exception class thrown when the array size exceeds the supported maximum, /// i.e. it is bigger than \c max_array_size(). /// It is derived from \ref bad_allocation_size but does not override the handler. - /// \ingroup core + /// \ingroup memory_core class bad_array_size : public bad_allocation_size { public: @@ -242,7 +242,7 @@ namespace wpi /// The exception class thrown when the alignment exceeds the supported maximum, /// i.e. it is bigger than \c max_alignment(). /// It is derived from \ref bad_allocation_size but does not override the handler. - /// \ingroup core + /// \ingroup memory_core class bad_alignment : public bad_allocation_size { public: diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/fallback_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/fallback_allocator.hpp index 456e84e44a..b699abd0b2 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/fallback_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/fallback_allocator.hpp @@ -16,12 +16,12 @@ namespace wpi { namespace memory { - /// A \concept{raw_allocator,RawAllocator} with a fallback. + /// A RawAllocator with a fallback. /// Allocation first tries `Default`, if it fails, /// it uses `Fallback`. - /// \requires `Default` must be a composable \concept{concept_rawallocator,RawAllocator}, - /// `Fallback` must be a \concept{concept_rawallocator,RawAllocator}. - /// \ingroup adapter + /// \requires `Default` must be a composable RawAllocator, + /// `Fallback` must be a RawAllocator. + /// \ingroup memory_adapter template class fallback_allocator : WPI_EBO(detail::ebo_storage<0, typename allocator_traits::allocator_type>), diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/heap_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/heap_allocator.hpp index 803a70598f..2b4ed24c73 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/heap_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/heap_allocator.hpp @@ -28,7 +28,7 @@ namespace wpi /// It shall return a \c nullptr if no memory is available. /// It must be thread safe. /// \defaultbe On a hosted implementation this function uses OS specific facilities, \c std::malloc is used as fallback. - /// \ingroup allocator + /// \ingroup memory_allocator void* heap_alloc(std::size_t size) noexcept; /// Deallocates heap memory. @@ -39,7 +39,7 @@ namespace wpi /// The pointer will not be zero. /// It must be thread safe. /// \defaultbe On a hosted implementation this function uses OS specific facilities, \c std::free is used as fallback. - /// \ingroup allocator + /// \ingroup memory_allocator void heap_dealloc(void* ptr, std::size_t size) noexcept; namespace detail @@ -65,10 +65,10 @@ namespace wpi heap_alloator_leak_checker) } // namespace detail - /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory from the heap. + /// A stateless RawAllocator that allocates memory from the heap. /// It uses the two functions \ref heap_alloc and \ref heap_dealloc for the allocation, /// which default to \c std::malloc and \c std::free. - /// \ingroup allocator + /// \ingroup memory_allocator using heap_allocator = WPI_IMPL_DEFINED(detail::lowlevel_allocator); diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/iteration_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/iteration_allocator.hpp index fafb72cf1f..49fc4637ca 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/iteration_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/iteration_allocator.hpp @@ -24,7 +24,7 @@ namespace wpi make_block_allocator_t; } // namespace detail - /// A stateful \concept{concept_rawallocator,RawAllocator} that is designed for allocations in a loop. + /// A stateful RawAllocator that is designed for allocations in a loop. /// It uses `N` stacks for the allocation, one of them is always active. /// Allocation uses the currently active stack. /// Calling \ref iteration_allocator::next_iteration() at the end of the loop, @@ -32,7 +32,7 @@ namespace wpi /// effectively releasing all of its memory. /// Any memory allocated will thus be usable for `N` iterations of the loop. /// This type of allocator is a generalization of the double frame allocator. - /// \ingroup allocator + /// \ingroup memory_allocator template class iteration_allocator : WPI_EBO(detail::iteration_block_allocator) @@ -40,7 +40,7 @@ namespace wpi public: using allocator_type = detail::iteration_block_allocator; - /// \effects Creates it with a given initial block size and and other constructor arguments for the \concept{concept_blockallocator,BlockAllocator}. + /// \effects Creates it with a given initial block size and and other constructor arguments for the BlockAllocator. /// It will allocate the first (and only) block and evenly divide it on all the stacks it uses. template explicit iteration_allocator(std::size_t block_size, Args&&... args) @@ -89,7 +89,7 @@ namespace wpi /// \effects Allocates a memory block of given size and alignment. /// It simply moves the top marker of the currently active stack. - /// \returns A \concept{concept_node,node} with given size and alignment. + /// \returns A node with given size and alignment. /// \throws \ref out_of_fixed_memory if the current stack does not have any memory left. /// \requires \c size and \c alignment must be valid. void* allocate(std::size_t size, std::size_t alignment) @@ -106,7 +106,7 @@ namespace wpi /// \effects Allocates a memory block of given size and alignment /// similar to \ref allocate(). - /// \returns A \concept{concept_node,node} with given size and alignment + /// \returns A node with given size and alignment /// or `nullptr` if the current stack does not have any memory left. void* try_allocate(std::size_t size, std::size_t alignment) noexcept { @@ -139,7 +139,7 @@ namespace wpi return cur_; } - /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the memory. + /// \returns A reference to the BlockAllocator used for managing the memory. /// \requires It is undefined behavior to move this allocator out into another object. allocator_type& get_allocator() noexcept { @@ -187,7 +187,7 @@ namespace wpi }; /// An alias for \ref iteration_allocator for two iterations. - /// \ingroup allocator + /// \ingroup memory_allocator template WPI_ALIAS_TEMPLATE(double_frame_allocator, iteration_allocator<2, BlockOrRawAllocator>); @@ -199,7 +199,7 @@ namespace wpi /// Specialization of the \ref allocator_traits for \ref iteration_allocator. /// \note It is not allowed to mix calls through the specialization and through the member functions, /// i.e. \ref memory_stack::allocate() and this \c allocate_node(). - /// \ingroup allocator + /// \ingroup memory_allocator template class allocator_traits> { @@ -256,7 +256,7 @@ namespace wpi }; /// Specialization of the \ref composable_allocator_traits for \ref iteration_allocator classes. - /// \ingroup allocator + /// \ingroup memory_allocator template class composable_allocator_traits> { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/joint_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/joint_allocator.hpp index 540bbd1592..19033f4c00 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/joint_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/joint_allocator.hpp @@ -97,7 +97,7 @@ namespace wpi /// Tag type that can't be created. /// /// It isued by \ref joint_ptr. - /// \ingroup allocator + /// \ingroup memory_allocator class joint { joint(std::size_t cap) noexcept : capacity(cap) {} @@ -113,7 +113,7 @@ namespace wpi /// Tag type to make the joint size more explicit. /// /// It is used by \ref joint_ptr. - /// \ingroup allocator + /// \ingroup memory_allocator struct joint_size { std::size_t size; @@ -125,7 +125,7 @@ namespace wpi /// /// This will disable default copy/move operations /// and inserts additional members for the joint memory management. - /// \ingroup allocator + /// \ingroup memory_allocator template class joint_type { @@ -205,9 +205,9 @@ namespace wpi /// make sure that you do not call their regular copy/move constructors, /// but instead the version where you pass an allocator. /// - /// The memory block will be managed by the given \concept{concept_rawallocator,RawAllocator}, + /// The memory block will be managed by the given RawAllocator, /// it is stored in an \ref allocator_reference and not owned by the pointer directly. - /// \ingroup allocator + /// \ingroup memory_allocator template class joint_ptr : WPI_EBO(allocator_reference) { @@ -220,7 +220,7 @@ namespace wpi //=== constructors/destructor/assignment ===// /// @{ - /// \effects Creates it with a \concept{concept_rawallocator,RawAllocator}, but does not own a new object. + /// \effects Creates it with a RawAllocator, but does not own a new object. explicit joint_ptr(allocator_type& alloc) noexcept : allocator_reference(alloc), ptr_(nullptr) { @@ -235,7 +235,7 @@ namespace wpi /// @{ /// \effects Reserves memory for the object and the additional size, /// and creates the object by forwarding the arguments to its constructor. - /// The \concept{concept_rawallocator,RawAllocator} will be used for the allocation. + /// The RawAllocator will be used for the allocation. template joint_ptr(allocator_type& alloc, joint_size additional_size, Args&&... args) : joint_ptr(alloc) @@ -450,7 +450,7 @@ namespace wpi /// @{ /// \returns A new \ref joint_ptr as if created with the same arguments passed to the constructor. /// \relatesalso joint_ptr - /// \ingroup allocator + /// \ingroup memory_allocator template auto allocate_joint(RawAllocator& alloc, joint_size additional_size, Args&&... args) -> joint_ptr @@ -471,7 +471,7 @@ namespace wpi /// @{ /// \returns A new \ref joint_ptr that points to a copy of `joint`. /// It will allocate as much memory as needed and forward to the copy constructor. - /// \ingroup allocator + /// \ingroup memory_allocator template auto clone_joint(RawAllocator& alloc, const joint_type& joint) -> joint_ptr @@ -493,12 +493,12 @@ namespace wpi } /// @} - /// A \concept{concept_rawallocator,RawAllocator} that uses the additional joint memory for its allocation. + /// A RawAllocator that uses the additional joint memory for its allocation. /// /// It is somewhat limited and allows only allocation once. /// All joint allocators for an object share the joint memory and must not be used in multiple threads. /// The memory it returns is owned by a \ref joint_ptr and will be destroyed through it. - /// \ingroup allocator + /// \ingroup memory_allocator class joint_allocator { public: @@ -567,7 +567,7 @@ namespace wpi /// Specialization of \ref is_shared_allocator to mark \ref joint_allocator as shared. /// This allows using it as \ref allocator_reference directly. - /// \ingroup allocator + /// \ingroup memory_allocator template <> struct is_shared_allocator : std::true_type { @@ -594,7 +594,7 @@ namespace wpi /// \note This is required because the container constructor will end up copying/moving the allocator. /// But this is not allowed as you need the allocator with the correct joined memory. /// Copying can be customized (i.e. forbidden), but sadly not move, so keep that in mind. - /// \ingroup allocator + /// \ingroup memory_allocator template <> struct propagation_traits { @@ -624,7 +624,7 @@ namespace wpi /// /// It has a dynamic, but fixed size, /// it cannot grow after it has been created. - /// \ingroup allocator + /// \ingroup memory_allocator template class joint_array { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/malloc_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/malloc_allocator.hpp index a5da1f4d49..5f38d304d7 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/malloc_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/malloc_allocator.hpp @@ -54,9 +54,9 @@ namespace wpi malloc_alloator_leak_checker) } // namespace detail - /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using std::malloc(). + /// A stateless RawAllocator that allocates memory using std::malloc(). /// It throws \ref out_of_memory when the allocation fails. - /// \ingroup allocator + /// \ingroup memory_allocator using malloc_allocator = WPI_IMPL_DEFINED(detail::lowlevel_allocator); diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_arena.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_arena.hpp index c4469e863f..dc6f195b67 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_arena.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_arena.hpp @@ -5,7 +5,7 @@ #define WPI_MEMORY_MEMORY_ARENA_HPP_INCLUDED /// \file -/// Class \ref wpi::memory::memory_arena and related functionality regarding \concept{concept_blockallocator,BlockAllocators}. +/// Class \ref wpi::memory::memory_arena and related functionality regarding BlockAllocators. #include @@ -23,7 +23,7 @@ namespace wpi { /// A memory block. /// It is defined by its starting address and size. - /// \ingroup core + /// \ingroup memory_core struct memory_block { void* memory; ///< The address of the memory block (might be \c nullptr). @@ -66,8 +66,8 @@ namespace wpi std::false_type is_block_allocator_impl(short); } // namespace detail - /// Traits that check whether a type models concept \concept{concept_blockallocator,BlockAllocator}. - /// \ingroup core + /// Traits that check whether a type models concept BlockAllocator. + /// \ingroup memory_core template struct is_block_allocator : decltype(detail::is_block_allocator_impl(0)) { @@ -85,7 +85,7 @@ namespace wpi /// This can be useful, e.g. if there will never be blocks available for deallocation. /// The (tiny) overhead for the cache can then be disabled. /// An example is \ref memory_pool. - /// \ingroup core + /// \ingroup memory_core constexpr bool cached_arena = true; constexpr bool uncached_arena = false; /// @} @@ -264,14 +264,14 @@ namespace wpi /// A memory arena that manages huge memory blocks for a higher-level allocator. /// Some allocators like \ref memory_stack work on huge memory blocks, /// this class manages them fro those allocators. - /// It uses a \concept{concept_blockallocator,BlockAllocator} for the allocation of those blocks. + /// It uses a BlockAllocator for the allocation of those blocks. /// The memory blocks in use are put onto a stack like structure, deallocation will pop from the top, /// so it is only possible to deallocate the last allocated block of the arena. /// By default, blocks are not really deallocated but stored in a cache. /// This can be disabled with the second template parameter, /// passing it \ref uncached_arena (or \c false) disables it, /// \ref cached_arena (or \c true) enables it explicitly. - /// \ingroup core + /// \ingroup memory_core template class memory_arena : WPI_EBO(BlockAllocator), WPI_EBO(detail::memory_arena_cache) @@ -292,9 +292,9 @@ namespace wpi return detail::memory_block_stack::implementation_offset() + byte_size; } - /// \effects Creates it by giving it the size and other arguments for the \concept{concept_blockallocator,BlockAllocator}. + /// \effects Creates it by giving it the size and other arguments for the BlockAllocator. /// It forwards these arguments to its constructor. - /// \requires \c block_size must be greater than \c min_block_size(0) and other requirements depending on the \concept{concept_blockallocator,BlockAllocator}. + /// \requires \c block_size must be greater than \c min_block_size(0) and other requirements depending on the BlockAllocator. /// \throws Anything thrown by the constructor of the \c BlockAllocator. template explicit memory_arena(std::size_t block_size, Args&&... args) @@ -303,7 +303,7 @@ namespace wpi WPI_MEMORY_ASSERT(block_size > min_block_size(0)); } - /// \effects Deallocates all memory blocks that where requested back to the \concept{concept_blockallocator,BlockAllocator}. + /// \effects Deallocates all memory blocks that where requested back to the BlockAllocator. ~memory_arena() noexcept { // clear cache @@ -346,7 +346,7 @@ namespace wpi /// It first uses a cache of previously deallocated blocks, if caching is enabled, /// if it is empty, allocates a new one. /// \returns The new \ref memory_block. - /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} allocation function. + /// \throws Anything thrown by the BlockAllocator allocation function. memory_block allocate_block() { if (!this->take_from_cache(used_)) @@ -411,7 +411,7 @@ namespace wpi /// \returns The size of the next memory block, /// i.e. of the next call to \ref allocate_block(). /// If there are blocks in the cache, returns size of the next one. - /// Otherwise forwards to the \concept{concept_blockallocator,BlockAllocator} and subtracts an implementation offset. + /// Otherwise forwards to the BlockAllocator and subtracts an implementation offset. std::size_t next_block_size() const noexcept { return this->cache_empty() ? @@ -420,7 +420,7 @@ namespace wpi this->cached_block_size(); } - /// \returns A reference of the \concept{concept_blockallocator,BlockAllocator} object. + /// \returns A reference of the BlockAllocator object. /// \requires It is undefined behavior to move this allocator out into another object. allocator_type& get_allocator() noexcept { @@ -438,12 +438,12 @@ namespace wpi extern template class memory_arena; #endif - /// A \concept{concept_blockallocator,BlockAllocator} that uses a given \concept{concept_rawallocator,RawAllocator} for allocating the blocks. + /// A BlockAllocator that uses a given RawAllocator for allocating the blocks. /// It calls the \c allocate_array() function with a node of size \c 1 and maximum alignment on the used allocator for the block allocation. /// The size of the next memory block will grow by a given factor after each allocation, /// allowing an amortized constant allocation time in the higher level allocator. /// The factor can be given as rational in the template parameter, default is \c 2. - /// \ingroup adapter + /// \ingroup memory_adapter template class growing_block_allocator : WPI_EBO(allocator_traits::allocator_type) @@ -466,7 +466,7 @@ namespace wpi /// \effects Allocates a new memory block and increases the block size for the next allocation. /// \returns The new \ref memory_block. - /// \throws Anything thrown by the \c allocate_array() function of the \concept{concept_rawallocator,RawAllocator}. + /// \throws Anything thrown by the \c allocate_array() function of the RawAllocator. memory_block allocate_block() { auto memory = @@ -491,7 +491,7 @@ namespace wpi return block_size_; } - /// \returns A reference to the used \concept{concept_rawallocator,RawAllocator} object. + /// \returns A reference to the used RawAllocator object. allocator_type& get_allocator() noexcept { return *this; @@ -519,10 +519,10 @@ namespace wpi extern template class memory_arena, false>; #endif - /// A \concept{concept_blockallocator,BlockAllocator} that allows only one block allocation. + /// A BlockAllocator that allows only one block allocation. /// It can be used to prevent higher-level allocators from expanding. - /// The one block allocation is performed through the \c allocate_array() function of the given \concept{concept_rawallocator,RawAllocator}. - /// \ingroup adapter + /// The one block allocation is performed through the \c allocate_array() function of the given RawAllocator. + /// \ingroup memory_adapter template class fixed_block_allocator : WPI_EBO(allocator_traits::allocator_type) { @@ -541,7 +541,7 @@ namespace wpi /// \effects Allocates a new memory block or throws an exception if there was already one allocation. /// \returns The new \ref memory_block. - /// \throws Anything thrown by the \c allocate_array() function of the \concept{concept_rawallocator,RawAllocator} or \ref out_of_memory if this is not the first call. + /// \throws Anything thrown by the \c allocate_array() function of the RawAllocator or \ref out_of_memory if this is not the first call. memory_block allocate_block() { if (block_size_) @@ -572,7 +572,7 @@ namespace wpi return block_size_; } - /// \returns A reference to the used \concept{concept_rawallocator,RawAllocator} object. + /// \returns A reference to the used RawAllocator object. allocator_type& get_allocator() noexcept { return *this; @@ -613,10 +613,10 @@ namespace wpi } } // namespace detail - /// Takes either a \concept{concept_blockallocator,BlockAllocator} or a \concept{concept_rawallocator,RawAllocator}. - /// In the first case simply aliases the type unchanged, in the second to \ref growing_block_allocator (or the template in `BlockAllocator`) with the \concept{concept_rawallocator,RawAllocator}. - /// Using this allows passing normal \concept{concept_rawallocator,RawAllocators} as \concept{concept_blockallocator,BlockAllocators}. - /// \ingroup core + /// Takes either a BlockAllocator or a RawAllocator. + /// In the first case simply aliases the type unchanged, in the second to \ref growing_block_allocator (or the template in `BlockAllocator`) with the RawAllocator. + /// Using this allows passing normal RawAllocators as BlockAllocators. + /// \ingroup memory_core template class BlockAllocator = detail::default_block_wrapper> using make_block_allocator_t = WPI_IMPL_DEFINED( @@ -625,10 +625,10 @@ namespace wpi BlockAllocator>::type); /// @{ - /// Helper function make a \concept{concept_blockallocator,BlockAllocator}. - /// \returns A \concept{concept_blockallocator,BlockAllocator} of the given type created with the given arguments. + /// Helper function make a BlockAllocator. + /// \returns A BlockAllocator of the given type created with the given arguments. /// \requires Same requirements as the constructor. - /// \ingroup core + /// \ingroup memory_core template make_block_allocator_t make_block_allocator(std::size_t block_size, Args&&... args) @@ -654,7 +654,7 @@ namespace wpi { /// Syntax sugar to express sizes with unit prefixes. /// \returns The number of bytes `value` is in the given unit. - /// \ingroup core + /// \ingroup memory_core /// @{ constexpr std::size_t operator"" _KiB(unsigned long long value) noexcept { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool.hpp index 282368663b..8858708383 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool.hpp @@ -32,7 +32,7 @@ namespace wpi }; } // namespace detail - /// A stateful \concept{concept_rawallocator,RawAllocator} that manages \concept{concept_node,nodes} of fixed size. + /// A stateful RawAllocator that manages nodes of fixed size. /// It uses a \ref memory_arena with a given \c BlockOrRawAllocator defaulting to \ref growing_block_allocator, /// subdivides them in small nodes of given size and puts them onto a free list. /// Allocation and deallocation simply remove or add nodes from this list and are thus fast. @@ -42,7 +42,7 @@ namespace wpi /// for example in a node based container like \c std::list. /// It is not so good for different allocation sizes and has some drawbacks for arrays /// as described in \ref memory_pool_type.hpp. - /// \ingroup allocator + /// \ingroup memory_allocator template class memory_pool : WPI_EBO(detail::default_leak_checker) @@ -57,8 +57,8 @@ namespace wpi static constexpr std::size_t min_node_size = WPI_IMPL_DEFINED(free_list::min_element_size); - /// \returns The minimum block size required for certain number of \concept{concept_node,node}. - /// \requires \c node_size must be a valid \concept{concept_node,node size} + /// \returns The minimum block size required for certain number of node. + /// \requires \c node_size must be a valid node size /// and \c number_of_nodes must be a non-zero value. /// \note MSVC's implementation of \c std::list for example is never empty and always allocates proxy nodes. /// To get enough memory for \c N elements of a list, \c number_of_nodes needs to include the proxy count in addition to \c N. @@ -69,12 +69,12 @@ namespace wpi + free_list::min_block_size(node_size, number_of_nodes); } - /// \effects Creates it by specifying the size each \concept{concept_node,node} will have, - /// the initial block size for the arena and other constructor arguments for the \concept{concept_blockallocator,BlockAllocator}. + /// \effects Creates it by specifying the size each node will have, + /// the initial block size for the arena and other constructor arguments for the BlockAllocator. /// If the \c node_size is less than the \c min_node_size, the \c min_node_size will be the actual node size. - /// It will allocate an initial memory block with given size from the \concept{concept_blockallocator,BlockAllocator} + /// It will allocate an initial memory block with given size from the BlockAllocator /// and puts it onto the free list. - /// \requires \c node_size must be a valid \concept{concept_node,node size} + /// \requires \c node_size must be a valid node size /// and \c block_size must be at least \c min_block_size(node_size, 1). template memory_pool(std::size_t node_size, std::size_t block_size, Args&&... args) @@ -84,7 +84,7 @@ namespace wpi } /// \effects Destroys the \ref memory_pool by returning all memory blocks, - /// regardless of properly deallocated back to the \concept{concept_blockallocator,BlockAllocator}. + /// regardless of properly deallocated back to the BlockAllocator. ~memory_pool() noexcept {} /// @{ @@ -108,12 +108,12 @@ namespace wpi } /// @} - /// \effects Allocates a single \concept{concept_node,node} by removing it from the free list. + /// \effects Allocates a single node by removing it from the free list. /// If the free list is empty, a new memory block will be allocated from the arena and put onto it. /// The new block size will be \ref next_capacity() big. /// \returns A node of size \ref node_size() suitable aligned, /// i.e. suitable for any type where sizeof(T) < node_size(). - /// \throws Anything thrown by the used \concept{concept_blockallocator,BlockAllocator}'s allocation function if a growth is needed. + /// \throws Anything thrown by the used BlockAllocator's allocation function if a growth is needed. void* allocate_node() { if (free_list_.empty()) @@ -122,7 +122,7 @@ namespace wpi return free_list_.allocate(); } - /// \effects Allocates a single \concept{concept_node,node} similar to \ref allocate_node(). + /// \effects Allocates a single node similar to \ref allocate_node(). /// But if the free list is empty, a new block will *not* be allocated. /// \returns A suitable aligned node of size \ref node_size() or `nullptr`. void* try_allocate_node() noexcept @@ -130,13 +130,13 @@ namespace wpi return free_list_.empty() ? nullptr : free_list_.allocate(); } - /// \effects Allocates an \concept{concept_array,array} of nodes by searching for \c n continuous nodes on the list and removing them. + /// \effects Allocates an array of nodes by searching for \c n continuous nodes on the list and removing them. /// Depending on the \c PoolType this can be a slow operation or not allowed at all. /// This can sometimes lead to a growth, even if technically there is enough continuous memory on the free list. /// \returns An array of \c n nodes of size \ref node_size() suitable aligned. - /// \throws Anything thrown by the used \concept{concept_blockallocator,BlockAllocator}'s allocation function if a growth is needed, + /// \throws Anything thrown by the used BlockAllocator's allocation function if a growth is needed, /// or \ref bad_array_size if n * node_size() is too big. - /// \requires \c n must be valid \concept{concept_array,array count}. + /// \requires \c n must be valid array count. void* allocate_array(std::size_t n) { detail::check_allocation_size( @@ -145,7 +145,7 @@ namespace wpi return allocate_array(n, node_size()); } - /// \effects Allocates an \concept{concept_array,array} of nodes similar to \ref allocate_array(). + /// \effects Allocates an array of nodes similar to \ref allocate_array(). /// But it will never allocate a new memory block. /// \returns An array of \c n nodes of size \ref node_size() suitable aligned /// or `nullptr`. @@ -154,7 +154,7 @@ namespace wpi return try_allocate_array(n, node_size()); } - /// \effects Deallocates a single \concept{concept_node,node} by putting it back onto the free list. + /// \effects Deallocates a single node by putting it back onto the free list. /// \requires \c ptr must be a result from a previous call to \ref allocate_node() on the same free list, /// i.e. either this allocator object or a new object created by moving this to it. void deallocate_node(void* ptr) noexcept @@ -162,7 +162,7 @@ namespace wpi free_list_.deallocate(ptr); } - /// \effects Deallocates a single \concept{concept_node,node} but it does not be a result of a previous call to \ref allocate_node(). + /// \effects Deallocates a single node but it does not be a result of a previous call to \ref allocate_node(). /// \returns `true` if the node could be deallocated, `false` otherwise. /// \note Some free list implementations can deallocate any memory, /// doesn't matter where it is coming from. @@ -174,7 +174,7 @@ namespace wpi return true; } - /// \effects Deallocates an \concept{concept_array,array} by putting it back onto the free list. + /// \effects Deallocates an array by putting it back onto the free list. /// \requires \c ptr must be a result from a previous call to \ref allocate_array() with the same \c n on the same free list, /// i.e. either this allocator object or a new object created by moving this to it. void deallocate_array(void* ptr, std::size_t n) noexcept @@ -183,7 +183,7 @@ namespace wpi free_list_.deallocate(ptr, n * node_size()); } - /// \effects Deallocates an \concept{concept_array,array} but it does not be a result of a previous call to \ref allocate_array(). + /// \effects Deallocates an array but it does not be a result of a previous call to \ref allocate_array(). /// \returns `true` if the node could be deallocated, `false` otherwise. /// \note Some free list implementations can deallocate any memory, /// doesn't matter where it is coming from. @@ -192,7 +192,7 @@ namespace wpi return try_deallocate_array(ptr, n, node_size()); } - /// \returns The size of each \concept{concept_node,node} in the pool, + /// \returns The size of each node in the pool, /// this is either the same value as in the constructor or \c min_node_size if the value was too small. std::size_t node_size() const noexcept { @@ -215,7 +215,7 @@ namespace wpi return free_list_.usable_size(arena_.next_block_size()); } - /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the arena. + /// \returns A reference to the BlockAllocator used for managing the arena. /// \requires It is undefined behavior to move this allocator out into another object. allocator_type& get_allocator() noexcept { @@ -280,7 +280,7 @@ namespace wpi /// Specialization of the \ref allocator_traits for \ref memory_pool classes. /// \note It is not allowed to mix calls through the specialization and through the member functions, /// i.e. \ref memory_pool::allocate_node() and this \c allocate_node(). - /// \ingroup allocator + /// \ingroup memory_allocator template class allocator_traits> { @@ -306,7 +306,7 @@ namespace wpi /// \effects Forwards to \ref memory_pool::allocate_array() /// with the number of nodes adjusted to be the minimum, /// i.e. when the \c size is less than the \ref memory_pool::node_size(). - /// \returns A \concept{concept_array,array} with specified properties. + /// \returns A array with specified properties. /// \requires The \ref memory_pool has to support array allocations. /// \throws Anything thrown by the pool allocation function. static void* allocate_array(allocator_type& state, std::size_t count, std::size_t size, @@ -360,7 +360,7 @@ namespace wpi }; /// Specialization of the \ref composable_allocator_traits for \ref memory_pool classes. - /// \ingroup allocator + /// \ingroup memory_allocator template class composable_allocator_traits> { @@ -382,7 +382,7 @@ namespace wpi /// \effects Forwards to \ref memory_pool::try_allocate_array() /// with the number of nodes adjusted to be the minimum, /// if the \c size is less than the \ref memory_pool::node_size(). - /// \returns A \concept{concept_array,array} with specified properties + /// \returns A array with specified properties /// or `nullptr` if it was unable to allocate. static void* try_allocate_array(allocator_type& state, std::size_t count, std::size_t size, std::size_t alignment) noexcept diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_collection.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_collection.hpp index 0bd02487bc..64faa5ca78 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_collection.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_collection.hpp @@ -34,7 +34,7 @@ namespace wpi /// A \c BucketDistribution for \ref memory_pool_collection defining that there is a bucket, i.e. pool, for each size. /// That means that for each possible size up to an upper bound there will be a seperate free list. /// Allocating a node will not waste any memory. - /// \ingroup allocator + /// \ingroup memory_allocator struct identity_buckets { using type = detail::identity_access_policy; @@ -43,19 +43,19 @@ namespace wpi /// A \c BucketDistribution for \ref memory_pool_collection defining that there is a bucket, i.e. pool, for each power of two. /// That means for each power of two up to an upper bound there will be a separate free list. /// Allocating a node will only waste half of the memory. - /// \ingroup allocator + /// \ingroup memory_allocator struct log2_buckets { using type = detail::log2_access_policy; }; - /// A stateful \concept{concept_rawallocator,RawAllocator} that behaves as a collection of multiple \ref memory_pool objects. + /// A stateful RawAllocator that behaves as a collection of multiple \ref memory_pool objects. /// It maintains a list of multiple free lists, whose types are controlled via the \c PoolType tags defined in \ref memory_pool_type.hpp, /// each of a different size as defined in the \c BucketDistribution (\ref identity_buckets or \ref log2_buckets). /// Allocating a node of given size will use the appropriate free list.
- /// This allocator is ideal for \concept{concept_node,node} allocations in any order but with a predefined set of sizes, + /// This allocator is ideal for node allocations in any order but with a predefined set of sizes, /// not only one size like \ref memory_pool. - /// \ingroup allocator + /// \ingroup memory_allocator template class memory_pool_collection @@ -72,10 +72,10 @@ namespace wpi using bucket_distribution = BucketDistribution; /// \effects Creates it by giving it the maximum node size it should be able to allocate, - /// the size of the initial memory block and other constructor arguments for the \concept{concept_blockallocator,BlockAllocator}. + /// the size of the initial memory block and other constructor arguments for the BlockAllocator. /// The \c BucketDistribution controls how many free lists are created, /// but unlike in \ref memory_pool all free lists are initially empty and the first memory block queued. - /// \requires \c block_size must be non-zero and \c max_node_size must be a valid \concept{concept_node,node} size and smaller than \c block_size divided by the number of pools. + /// \requires \c block_size must be non-zero and \c max_node_size must be a valid node size and smaller than \c block_size divided by the number of pools. template memory_pool_collection(std::size_t max_node_size, std::size_t block_size, Args&&... args) @@ -87,7 +87,7 @@ namespace wpi } /// \effects Destroys the \ref memory_pool_collection by returning all memory blocks, - /// regardless of properly deallocated back to the \concept{concept_blockallocator,BlockAllocator}. + /// regardless of properly deallocated back to the BlockAllocator. ~memory_pool_collection() noexcept = default; /// @{ @@ -113,16 +113,16 @@ namespace wpi } /// @} - /// \effects Allocates a \concept{concept_node,node} of given size. + /// \effects Allocates a node of given size. /// It first finds the appropriate free list as defined in the \c BucketDistribution. /// If it is empty, it will use an implementation defined amount of memory from the arena /// and inserts it in it. - /// If the arena is empty too, it will request a new memory block from the \concept{concept_blockallocator,BlockAllocator} + /// If the arena is empty too, it will request a new memory block from the BlockAllocator /// of size \ref next_capacity() and puts part of it onto this free list. /// Then it removes a node from it. - /// \returns A \concept{concept_node,node} of given size suitable aligned, + /// \returns A node of given size suitable aligned, /// i.e. suitable for any type where sizeof(T) < node_size. - /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} if a growth is needed or a \ref bad_node_size exception if the node size is too big. + /// \throws Anything thrown by the BlockAllocator if a growth is needed or a \ref bad_node_size exception if the node size is too big. void* allocate_node(std::size_t node_size) { detail::check_allocation_size( @@ -139,10 +139,10 @@ namespace wpi return mem; } - /// \effects Allocates a \concept{concept_node,node} of given size. + /// \effects Allocates a node of given size. /// It is similar to \ref allocate_node() but will return `nullptr` on any failure, /// instead of growing the arnea and possibly throwing. - /// \returns A \concept{concept_node,node} of given size suitable aligned + /// \returns A node of given size suitable aligned /// or `nullptr` in case of failure. void* try_allocate_node(std::size_t node_size) noexcept { @@ -158,15 +158,15 @@ namespace wpi return pool.allocate(); } - /// \effects Allocates an \concept{concept_array,array} of nodes by searching for \c n continuous nodes on the appropriate free list and removing them. + /// \effects Allocates an array of nodes by searching for \c n continuous nodes on the appropriate free list and removing them. /// Depending on the \c PoolType this can be a slow operation or not allowed at all. /// This can sometimes lead to a growth on the free list, even if technically there is enough continuous memory on the free list. /// Otherwise has the same behavior as \ref allocate_node(). /// \returns An array of \c n nodes of size \c node_size suitable aligned. - /// \throws Anything thrown by the used \concept{concept_blockallocator,BlockAllocator}'s allocation function if a growth is needed, + /// \throws Anything thrown by the used BlockAllocator's allocation function if a growth is needed, /// or a \ref bad_allocation_size exception. - /// \requires \c count must be valid \concept{concept_array,array count} and - /// \c node_size must be valid \concept{concept_node,node size}. + /// \requires \c count must be valid array count and + /// \c node_size must be valid node size. void* allocate_array(std::size_t count, std::size_t node_size) { detail::check_allocation_size( @@ -202,10 +202,10 @@ namespace wpi return mem; } - /// \effects Allocates a \concept{concept_array,array} of given size. + /// \effects Allocates a array of given size. /// It is similar to \ref allocate_node() but will return `nullptr` on any failure, /// instead of growing the arnea and possibly throwing. - /// \returns A \concept{concept_array,array} of given size suitable aligned + /// \returns A array of given size suitable aligned /// or `nullptr` in case of failure. void* try_allocate_array(std::size_t count, std::size_t node_size) noexcept { @@ -221,7 +221,7 @@ namespace wpi return pool.allocate(count * node_size); } - /// \effects Deallocates a \concept{concept_node,node} by putting it back onto the appropriate free list. + /// \effects Deallocates a node by putting it back onto the appropriate free list. /// \requires \c ptr must be a result from a previous call to \ref allocate_node() with the same size on the same free list, /// i.e. either this allocator object or a new object created by moving this to it. void deallocate_node(void* ptr, std::size_t node_size) noexcept @@ -229,7 +229,7 @@ namespace wpi pools_.get(node_size).deallocate(ptr); } - /// \effects Deallocates a \concept{concept_node,node} similar to \ref deallocate_node(). + /// \effects Deallocates a node similar to \ref deallocate_node(). /// But it checks if it can deallocate this memory. /// \returns `true` if the node could be deallocated, /// `false` otherwise. @@ -241,7 +241,7 @@ namespace wpi return true; } - /// \effects Deallocates an \concept{concept_array,array} by putting it back onto the free list. + /// \effects Deallocates an array by putting it back onto the free list. /// \requires \c ptr must be a result from a previous call to \ref allocate_array() with the same sizes on the same free list, /// i.e. either this allocator object or a new object created by moving this to it. void deallocate_array(void* ptr, std::size_t count, std::size_t node_size) noexcept @@ -249,7 +249,7 @@ namespace wpi pools_.get(node_size).deallocate(ptr, count * node_size); } - /// \effects Deallocates a \concept{concept_array,array} similar to \ref deallocate_array(). + /// \effects Deallocates a array similar to \ref deallocate_array(). /// But it checks if it can deallocate this memory. /// \returns `true` if the array could be deallocated, /// `false` otherwise. @@ -263,10 +263,10 @@ namespace wpi /// \effects Inserts more memory on the free list for nodes of given size. /// It will try to put \c capacity_left bytes from the arena onto the free list defined over the \c BucketDistribution, - /// if the arena is empty, a new memory block is requested from the \concept{concept_blockallocator,BlockAllocator} + /// if the arena is empty, a new memory block is requested from the BlockAllocator /// and it will be used. - /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} if a growth is needed. - /// \requires \c node_size must be valid \concept{concept_node,node size} less than or equal to \ref max_node_size(), + /// \throws Anything thrown by the BlockAllocator if a growth is needed. + /// \requires \c node_size must be valid node size less than or equal to \ref max_node_size(), /// \c capacity_left must be less than \ref next_capacity(). void reserve(std::size_t node_size, std::size_t capacity) { @@ -294,7 +294,7 @@ namespace wpi /// \returns The amount of memory available in the arena not inside the free lists. /// This is the number of bytes that can be inserted into the free lists - /// without requesting more memory from the \concept{concept_blockallocator,BlockAllocator}. + /// without requesting more memory from the BlockAllocator. /// \note Array allocations may lead to a growth even if the capacity is big enough. std::size_t capacity_left() const noexcept { @@ -309,7 +309,7 @@ namespace wpi return arena_.next_block_size(); } - /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the arena. + /// \returns A reference to the BlockAllocator used for managing the arena. /// \requires It is undefined behavior to move this allocator out into another object. allocator_type& get_allocator() noexcept { @@ -398,7 +398,7 @@ namespace wpi /// An alias for \ref memory_pool_collection using the \ref identity_buckets policy /// and a \c PoolType defaulting to \ref node_pool. - /// \ingroup allocator + /// \ingroup memory_allocator template WPI_ALIAS_TEMPLATE(bucket_allocator, memory_pool_collection); @@ -409,7 +409,7 @@ namespace wpi /// Specialization of the \ref allocator_traits for \ref memory_pool_collection classes. /// \note It is not allowed to mix calls through the specialization and through the member functions, /// i.e. \ref memory_pool_collection::allocate_node() and this \c allocate_node(). - /// \ingroup allocator + /// \ingroup memory_allocator template class allocator_traits> { @@ -484,7 +484,7 @@ namespace wpi }; /// Specialization of the \ref composable_allocator_traits for \ref memory_pool_collection classes. - /// \ingroup allocator + /// \ingroup memory_allocator template class composable_allocator_traits> { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_type.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_type.hpp index 7ebe4a51d7..e24474bef2 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_type.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_pool_type.hpp @@ -20,7 +20,7 @@ namespace wpi /// Tag type defining a memory pool optimized for nodes. /// It does not support array allocations that great and may trigger a growth even if there is enough memory. /// But it is the fastest pool type. - /// \ingroup allocator + /// \ingroup memory_allocator struct node_pool : WPI_EBO(std::true_type) { using type = detail::node_free_memory_list; @@ -31,7 +31,7 @@ namespace wpi /// Array allocations are still pretty slow, if the array gets big enough it can get slower than \c new. /// Node allocations are still fast, unless there is deallocation in random order. /// \note Use this tag type only if you really need to have a memory pool! - /// \ingroup allocator + /// \ingroup memory_allocator struct array_pool : WPI_EBO(std::true_type) { using type = detail::array_free_memory_list; @@ -41,7 +41,7 @@ namespace wpi /// The free list is intrusive and thus requires that each node has at least the size of a pointer. /// This tag type does not have this requirement and thus allows zero-memory-overhead allocations of small nodes. /// It is a little bit slower than \ref node_pool and does not support arrays. - /// \ingroup allocator + /// \ingroup memory_allocator struct small_node_pool : WPI_EBO(std::false_type) { using type = detail::small_free_memory_list; diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_resource_adapter.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_resource_adapter.hpp index 8428bb24d0..4f591e19fa 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_resource_adapter.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_resource_adapter.hpp @@ -87,11 +87,11 @@ namespace wpi namespace memory { /// The \c memory_resource abstract base class used in the implementation. - /// \ingroup adapter + /// \ingroup memory_adapter WPI_ALIAS_TEMPLATE(memory_resource, foonathan_memory_pmr::memory_resource); - /// Wraps a \concept{concept_rawallocator,RawAllocator} and makes it a \ref memory_resource. - /// \ingroup adapter + /// Wraps a RawAllocator and makes it a \ref memory_resource. + /// \ingroup memory_adapter template class memory_resource_adapter : public memory_resource, @@ -124,7 +124,7 @@ namespace wpi /// \effects Allocates raw memory with given size and alignment. /// It forwards to \c allocate_node() or \c allocate_array() depending on the size. - /// \returns The new memory as returned by the \concept{concept_rawallocator,RawAllocator}. + /// \returns The new memory as returned by the RawAllocator. /// \throws Anything thrown by the allocation function. void* do_allocate(std::size_t bytes, std::size_t alignment) override { @@ -162,8 +162,8 @@ namespace wpi } }; - /// Wraps a \ref memory_resource and makes it a \concept{concept_rawallocator,RawAllocator}. - /// \ingroup adapter + /// Wraps a \ref memory_resource and makes it a RawAllocator. + /// \ingroup memory_adapter class memory_resource_allocator { public: @@ -227,7 +227,7 @@ namespace wpi /// Specialization of \ref is_shared_allocator to mark \ref memory_resource_allocator as shared. /// This allows using it as \ref allocator_reference directly. - /// \ingroup adapter + /// \ingroup memory_adapter template <> struct is_shared_allocator : std::true_type { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_stack.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_stack.hpp index 0c9d8962a2..965f0812b5 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_stack.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/memory_stack.hpp @@ -92,12 +92,12 @@ namespace wpi }; } // namespace detail - /// A stateful \concept{concept_rawallocator,RawAllocator} that provides stack-like (LIFO) allocations. + /// A stateful RawAllocator that provides stack-like (LIFO) allocations. /// It uses a \ref memory_arena with a given \c BlockOrRawAllocator defaulting to \ref growing_block_allocator to allocate huge blocks /// and saves a marker to the current top. /// Allocation simply moves this marker by the appropriate number of bytes and returns the pointer at the old marker position, /// deallocation is not directly supported, only setting the marker to a previously queried position. - /// \ingroup allocator + /// \ingroup memory_allocator template class memory_stack : WPI_EBO(detail::default_leak_checker) @@ -116,7 +116,7 @@ namespace wpi return detail::memory_block_stack::implementation_offset() + byte_size; } - /// \effects Creates it with a given initial block size and and other constructor arguments for the \concept{concept_blockallocator,BlockAllocator}. + /// \effects Creates it with a given initial block size and and other constructor arguments for the BlockAllocator. /// It will allocate the first block and sets the top to its beginning. /// \requires \c block_size must be at least \c min_block_size(1). template @@ -129,10 +129,10 @@ namespace wpi /// \effects Allocates a memory block of given size and alignment. /// It simply moves the top marker. /// If there is not enough space on the current memory block, - /// a new one will be allocated by the \concept{concept_blockallocator,BlockAllocator} or taken from a cache + /// a new one will be allocated by the BlockAllocator or taken from a cache /// and used for the allocation. - /// \returns A \concept{concept_node,node} with given size and alignment. - /// \throws Anything thrown by the \concept{concept_blockallocator,BlockAllocator} on growth + /// \returns A node with given size and alignment. + /// \throws Anything thrown by the BlockAllocator on growth /// or \ref bad_allocation_size if \c size is too big. /// \requires \c size and \c alignment must be valid. void* allocate(std::size_t size, std::size_t alignment) @@ -160,7 +160,7 @@ namespace wpi /// \effects Allocates a memory block of given size and alignment, /// similar to \ref allocate(). /// But it does not attempt a growth if the arena is empty. - /// \returns A \concept{concept_node,node} with given size and alignment + /// \returns A node with given size and alignment /// or `nullptr` if there wasn't enough memory available. void* try_allocate(std::size_t size, std::size_t alignment) noexcept { @@ -221,7 +221,7 @@ namespace wpi } } - /// \effects \ref unwind() does not actually do any deallocation of blocks on the \concept{concept_blockallocator,BlockAllocator}, + /// \effects \ref unwind() does not actually do any deallocation of blocks on the BlockAllocator, /// unused memory is stored in a cache for later reuse. /// This function clears that cache. void shrink_to_fit() noexcept @@ -231,7 +231,7 @@ namespace wpi /// \returns The amount of memory remaining in the current block. /// This is the number of bytes that are available for allocation - /// before the cache or \concept{concept_blockallocator,BlockAllocator} needs to be used. + /// before the cache or BlockAllocator needs to be used. std::size_t capacity_left() const noexcept { return std::size_t(block_end() - stack_.top()); @@ -246,7 +246,7 @@ namespace wpi return arena_.next_block_size(); } - /// \returns A reference to the \concept{concept_blockallocator,BlockAllocator} used for managing the arena. + /// \returns A reference to the BlockAllocator used for managing the arena. /// \requires It is undefined behavior to move this allocator out into another object. allocator_type& get_allocator() noexcept { @@ -276,7 +276,7 @@ namespace wpi /// A `Stack` is anything that provides a `marker`, a `top()` function returning a `marker` /// and an `unwind()` function to unwind to a `marker`, /// like a \ref wpi::memory::memory_stack - /// \ingroup allocator + /// \ingroup memory_allocator template > class memory_stack_raii_unwind { @@ -379,7 +379,7 @@ namespace wpi /// Specialization of the \ref allocator_traits for \ref memory_stack classes. /// \note It is not allowed to mix calls through the specialization and through the member functions, /// i.e. \ref memory_stack::allocate() and this \c allocate_node(). - /// \ingroup allocator + /// \ingroup memory_allocator template class allocator_traits> { @@ -441,7 +441,7 @@ namespace wpi }; /// Specialization of the \ref composable_allocator_traits for \ref memory_stack classes. - /// \ingroup allocator + /// \ingroup memory_allocator template class composable_allocator_traits> { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/namespace_alias.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/namespace_alias.hpp index 4af20c1487..e1d8d60990 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/namespace_alias.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/namespace_alias.hpp @@ -7,13 +7,18 @@ /// \file /// Convenient namespace alias. -/// \defgroup core Core components +/// \defgroup memory Memory Allocator Library +/// @{ -/// \defgroup allocator Allocator implementations +/// \defgroup memory_core Core components -/// \defgroup adapter Adapters and Wrappers +/// \defgroup memory_allocator Allocator implementations -/// \defgroup storage Allocator storage +/// \defgroup memory_adapter Adapters and Wrappers + +/// \defgroup memory_storage Allocator storage + +/// @} /// \namespace wpi /// Foonathan namespace. @@ -32,5 +37,5 @@ namespace wpi } // namespace wpi namespace memory = wpi::memory; - +///@} #endif // WPI_MEMORY_NAMESPACE_ALIAS_HPP_INCLUDED diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/new_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/new_allocator.hpp index 0beec00a3c..e672e6526d 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/new_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/new_allocator.hpp @@ -37,10 +37,10 @@ namespace wpi new_alloator_leak_checker) } // namespace detail - /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using (nothrow) operator new. + /// A stateless RawAllocator that allocates memory using (nothrow) operator new. /// If the operator returns \c nullptr, it behaves like \c new and loops calling \c std::new_handler, /// but instead of throwing a \c std::bad_alloc exception, it throws \ref out_of_memory. - /// \ingroup allocator + /// \ingroup memory_allocator using new_allocator = WPI_IMPL_DEFINED(detail::lowlevel_allocator); diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/segregator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/segregator.hpp index ae06f830f9..7bebd169e1 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/segregator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/segregator.hpp @@ -17,8 +17,8 @@ namespace wpi { namespace memory { - /// A \concept{concept_segregatable,Segregatable} that allocates until a maximum size. - /// \ingroup adapter + /// A Segregatable that allocates until a maximum size. + /// \ingroup memory_adapter template class threshold_segregatable : WPI_EBO(allocator_traits::allocator_type) { @@ -76,9 +76,9 @@ namespace wpi std::forward(alloc)); } - /// A composable \concept{concept_rawallocator,RawAllocator} that will always fail. + /// A composable RawAllocator that will always fail. /// This is useful for compositioning or as last resort in \ref binary_segregator. - /// \ingroup allocator + /// \ingroup memory_allocator class null_allocator { public: @@ -116,10 +116,10 @@ namespace wpi } }; - /// A \concept{concept_rawallocator,RawAllocator} that either uses the \concept{concept_segregatable,Segregatable} or the other `RawAllocator`. + /// A RawAllocator that either uses the Segregatable or the other `RawAllocator`. /// It is a faster alternative to \ref fallback_allocator that doesn't require a composable allocator /// and decides about the allocator to use purely with the `Segregatable` based on size and alignment. - /// \ingroup adapter + /// \ingroup memory_adapter template class binary_segregator : WPI_EBO( @@ -133,8 +133,8 @@ namespace wpi using segregatable_allocator_type = typename segregatable::allocator_type; using fallback_allocator_type = typename allocator_traits::allocator_type; - /// \effects Creates it by giving the \concept{concept_segregatable,Segregatable} - /// and the \concept{concept_rawallocator,RawAllocator}. + /// \effects Creates it by giving the Segregatable + /// and the RawAllocator. explicit binary_segregator(segregatable s, fallback_allocator_type fallback = fallback_allocator_type()) : detail::ebo_storage<1, fallback_allocator_type>(detail::move(fallback)), @@ -143,7 +143,7 @@ namespace wpi } /// @{ - /// \effects Uses the \concept{concept_segregatable,Segregatable} to decide which allocator to use. + /// \effects Uses the Segregatable to decide which allocator to use. /// Then forwards to the chosen allocator. void* allocate_node(std::size_t size, std::size_t alignment) { @@ -223,7 +223,7 @@ namespace wpi /// @{ /// \returns A reference to the fallback allocator. - /// It will be used if the \concept{concept_segregator,Segregator} doesn't want the alloction. + /// It will be used if the Segregator doesn't want the alloction. fallback_allocator_type& get_fallback_allocator() noexcept { return detail::ebo_storage<1, fallback_allocator_type>::get(); @@ -366,16 +366,16 @@ namespace wpi } // namespace detail /// Creates multiple nested \ref binary_segregator. - /// If you pass one type, it must be a \concept{concept_segregatable,Segregatable}. + /// If you pass one type, it must be a Segregatable. /// Then the result is a \ref binary_segregator with that `Segregatable` and \ref null_allocator as fallback. /// If you pass two types, the first one must be a `Segregatable`, - /// the second one a \concept{concept_rawallocator,RawAllocator}. + /// the second one a RawAllocator. /// Then the result is a simple \ref binary_segregator with those arguments. /// If you pass more than one, the last one must be a `RawAllocator` all others `Segregatable`, /// the result is `binary_segregator>`. /// \note It will result in an allocator that tries each `Segregatable` in the order specified /// using the last parameter as final fallback. - /// \ingroup adapter + /// \ingroup memory_adapter template WPI_ALIAS_TEMPLATE(segregator, typename detail::make_segregator_t::type); @@ -388,7 +388,7 @@ namespace wpi return detail::make_segregator(std::forward(args)...); } - /// The number of \concept{concept_segregatable,Segregatable} a \ref segregator has. + /// The number of Segregatable a \ref segregator has. /// \relates segregator template struct segregator_size @@ -396,13 +396,13 @@ namespace wpi static const std::size_t value = detail::fallback_type::size; }; - /// The type of the `I`th \concept{concept_segregatable,Segregatable}. + /// The type of the `I`th Segregatable. /// \relates segregator template using segregatable_allocator_type = typename detail::segregatable_type::type; /// @{ - /// \returns The `I`th \concept{concept_segregatable,Segregatable}. + /// \returns The `I`th Segregatable. /// \relates segregrator template auto get_segregatable_allocator(binary_segregator& s) @@ -419,13 +419,13 @@ namespace wpi } /// @} - /// The type of the final fallback \concept{concept_rawallocator,RawAllocator}. + /// The type of the final fallback RawAllocator. /// \relates segregator template using fallback_allocator_type = typename detail::fallback_type::type; /// @{ - /// \returns The final fallback \concept{concept_rawallocator,RawAllocator}. + /// \returns The final fallback RawAllocator. /// \relates segregator template auto get_fallback_allocator(binary_segregator& s) diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/smart_ptr.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/smart_ptr.hpp index 016f31be77..23ff7f11ae 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/smart_ptr.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/smart_ptr.hpp @@ -5,7 +5,7 @@ #define WPI_MEMORY_SMART_PTR_HPP_INCLUDED /// \file -/// \c std::make_unique() / \c std::make_shared() replacement allocating memory through a \concept{concept_rawallocator,RawAllocator}. +/// \c std::make_unique() / \c std::make_shared() replacement allocating memory through a RawAllocator. /// \note Only available on a hosted implementation. #include "config.hpp" @@ -85,33 +85,33 @@ namespace wpi } } // namespace detail - /// A \c std::unique_ptr that deletes using a \concept{concept_rawallocator,RawAllocator}. + /// A \c std::unique_ptr that deletes using a RawAllocator. /// /// It is an alias template using \ref allocator_deleter as \c Deleter class. - /// \ingroup adapter + /// \ingroup memory_adapter template WPI_ALIAS_TEMPLATE(unique_ptr, std::unique_ptr>); - /// A \c std::unique_ptr that deletes using a \concept{concept_rawallocator,RawAllocator} and allows polymorphic types. + /// A \c std::unique_ptr that deletes using a RawAllocator and allows polymorphic types. /// /// It can only be created by converting a regular unique pointer to a pointer to a derived class, /// and is meant to be used inside containers. /// It is an alias template using \ref allocator_polymorphic_deleter as \c Deleter class. /// \note It has a relatively high overhead, so only use it if you have to. - /// \ingroup adapter + /// \ingroup memory_adapter template WPI_ALIAS_TEMPLATE( unique_base_ptr, std::unique_ptr>); - /// Creates a \c std::unique_ptr using a \concept{concept_rawallocator,RawAllocator} for the allocation. + /// Creates a \c std::unique_ptr using a RawAllocator for the allocation. /// \effects Allocates memory for the given type using the allocator /// and creates a new object inside it passing the given arguments to its constructor. /// \returns A \c std::unique_ptr owning that memory. /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, /// the caller has to ensure that the object lives as long as the smart pointer. - /// \ingroup adapter + /// \ingroup memory_adapter template auto allocate_unique(RawAllocator&& alloc, Args&&... args) -> WPI_REQUIRES_RET( !std::is_array::value, @@ -122,14 +122,14 @@ namespace wpi detail::forward(args)...); } - /// Creates a \c std::unique_ptr using a type-erased \concept{concept_rawallocator,RawAllocator} for the allocation. + /// Creates a \c std::unique_ptr using a type-erased RawAllocator for the allocation. /// It is the same as the other overload but stores the reference to the allocator type-erased inside the \c std::unique_ptr. /// \effects Allocates memory for the given type using the allocator /// and creates a new object inside it passing the given arguments to its constructor. /// \returns A \c std::unique_ptr with a type-erased allocator reference owning that memory. /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, /// the caller has to ensure that the object lives as long as the smart pointer. - /// \ingroup adapter + /// \ingroup memory_adapter template auto allocate_unique(any_allocator, RawAllocator&& alloc, Args&&... args) -> WPI_REQUIRES_RET(!std::is_array::value, @@ -141,12 +141,12 @@ namespace wpi detail::forward(args)...); } - /// Creates a \c std::unique_ptr owning an array using a \concept{concept_rawallocator,RawAllocator} for the allocation. + /// Creates a \c std::unique_ptr owning an array using a RawAllocator for the allocation. /// \effects Allocates memory for an array of given size and value initializes each element inside of it. /// \returns A \c std::unique_ptr owning that array. /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, /// the caller has to ensure that the object lives as long as the smart pointer. - /// \ingroup adapter + /// \ingroup memory_adapter template auto allocate_unique(RawAllocator&& alloc, std::size_t size) -> WPI_REQUIRES_RET( std::is_array::value, @@ -158,13 +158,13 @@ namespace wpi detail::forward(alloc))); } - /// Creates a \c std::unique_ptr owning an array using a type-erased \concept{concept_rawallocator,RawAllocator} for the allocation. + /// Creates a \c std::unique_ptr owning an array using a type-erased RawAllocator for the allocation. /// It is the same as the other overload but stores the reference to the allocator type-erased inside the \c std::unique_ptr. /// \effects Allocates memory for an array of given size and value initializes each element inside of it. /// \returns A \c std::unique_ptr with a type-erased allocator reference owning that array. /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the deleter, /// the caller has to ensure that the object lives as long as the smart pointer. - /// \ingroup adapter + /// \ingroup memory_adapter template auto allocate_unique(any_allocator, RawAllocator&& alloc, std::size_t size) -> WPI_REQUIRES_RET(std::is_array::value, @@ -177,13 +177,13 @@ namespace wpi alloc))); } - /// Creates a \c std::shared_ptr using a \concept{concept_rawallocator,RawAllocator} for the allocation. + /// Creates a \c std::shared_ptr using a RawAllocator for the allocation. /// It is similar to \c std::allocate_shared but uses a \c RawAllocator (and thus also supports any \c Allocator). /// \effects Calls \ref std_allocator::make_std_allocator to wrap the allocator and forwards to \c std::allocate_shared. /// \returns A \c std::shared_ptr created using \c std::allocate_shared. /// \note If the allocator is stateful a reference to the \c RawAllocator will be stored inside the shared pointer, /// the caller has to ensure that the object lives as long as the smart pointer. - /// \ingroup adapter + /// \ingroup memory_adapter template std::shared_ptr allocate_shared(RawAllocator&& alloc, Args&&... args) { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/static_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/static_allocator.hpp index 33242f9013..8ac78f7bfb 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/static_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/static_allocator.hpp @@ -27,7 +27,7 @@ namespace wpi /// Its constructor will take a reference to it and use it for its allocation. /// The storage type is simply a \c char array aligned for maximum alignment. /// \note It is not allowed to access the memory of the storage. - /// \ingroup allocator + /// \ingroup memory_allocator template struct static_allocator_storage { @@ -39,11 +39,11 @@ namespace wpi struct allocator_info; - /// A stateful \concept{concept_rawallocator,RawAllocator} that uses a fixed sized storage for the allocations. + /// A stateful RawAllocator that uses a fixed sized storage for the allocations. /// It works on a \ref static_allocator_storage and uses its memory for all allocations. /// Deallocations are not supported, memory cannot be marked as freed.
/// \note It is not allowed to share an \ref static_allocator_storage between multiple \ref static_allocator objects. - /// \ingroup allocator + /// \ingroup memory_allocator class static_allocator { public: @@ -60,13 +60,13 @@ namespace wpi { } - /// \effects A \concept{concept_rawallocator,RawAllocator} allocation function. + /// \effects A RawAllocator allocation function. /// It uses the specified \ref static_allocator_storage. - /// \returns A pointer to a \concept{concept_node,node}, it will never be \c nullptr. + /// \returns A pointer to a node, it will never be \c nullptr. /// \throws An exception of type \ref out_of_memory or whatever is thrown by its handler if the storage is exhausted. void* allocate_node(std::size_t size, std::size_t alignment); - /// \effects A \concept{concept_rawallocator,RawAllocator} deallocation function. + /// \effects A RawAllocator deallocation function. /// It does nothing, deallocation is not supported by this allocator. void deallocate_node(void*, std::size_t, std::size_t) noexcept {} @@ -96,11 +96,11 @@ namespace wpi struct memory_block; - /// A \concept{concept_blockallocator,BlockAllocator} that allocates the blocks from a fixed size storage. + /// A BlockAllocator that allocates the blocks from a fixed size storage. /// It works on a \ref static_allocator_storage and uses it for all allocations, /// deallocations are only allowed in reversed order which is guaranteed by \ref memory_arena. /// \note It is not allowed to share an \ref static_allocator_storage between multiple \ref static_allocator objects. - /// \ingroup allocator + /// \ingroup memory_allocator class static_block_allocator { public: diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/std_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/std_allocator.hpp index 18262eb512..d24d59dcd0 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/std_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/std_allocator.hpp @@ -43,8 +43,8 @@ namespace wpi auto propagate_on_container_copy_assignment(min_concept) -> std::true_type; } // namespace traits_detail - /// Controls the propagation of a \ref std_allocator for a certain \concept{concept_rawallocator,RawAllocator}. - /// \ingroup adapter + /// Controls the propagation of a \ref std_allocator for a certain RawAllocator. + /// \ingroup memory_adapter template struct propagation_traits { @@ -67,9 +67,9 @@ namespace wpi } }; - /// Wraps a \concept{concept_rawallocator,RawAllocator} and makes it a "normal" \c Allocator. + /// Wraps a RawAllocator and makes it a "normal" \c Allocator. /// It allows using a \c RawAllocator anywhere a \c Allocator is required. - /// \ingroup adapter + /// \ingroup memory_adapter template class std_allocator : #if defined _MSC_VER && defined __clang__ @@ -186,7 +186,7 @@ namespace wpi } //=== allocation/deallocation ===// - /// \effects Allocates memory using the underlying \concept{concept_rawallocator,RawAllocator}. + /// \effects Allocates memory using the underlying RawAllocator. /// If \c n is \c 1, it will call allocate_node(sizeof(T), alignof(T)), /// otherwise allocate_array(n, sizeof(T), alignof(T)). /// \returns A pointer to a memory block suitable for \c n objects of type \c T. @@ -196,7 +196,7 @@ namespace wpi return static_cast(allocate_impl(is_any{}, n)); } - /// \effects Deallcoates memory using the underlying \concept{concept_rawallocator,RawAllocator}. + /// \effects Deallcoates memory using the underlying RawAllocator. /// It will forward to the deallocation function in the same way as in \ref allocate(). /// \requires The pointer must come from a previous call to \ref allocate() with the same \c n on this object or any copy of it. void deallocate(pointer p, size_type n) noexcept @@ -341,10 +341,10 @@ namespace wpi return {detail::forward(allocator)}; } - /// An alias template for \ref std_allocator using a type-erased \concept{concept_rawallocator,RawAllocator}. + /// An alias template for \ref std_allocator using a type-erased RawAllocator. /// This is the same as using a \ref std_allocator with the tag type \ref any_allocator. /// The implementation is optimized to call fewer virtual functions. - /// \ingroup adapter + /// \ingroup memory_adapter template WPI_ALIAS_TEMPLATE(any_std_allocator, std_allocator); diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/temporary_allocator.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/temporary_allocator.hpp index 6d5d73f1d3..11548de6d1 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/temporary_allocator.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/temporary_allocator.hpp @@ -91,7 +91,7 @@ namespace wpi /// A wrapper around the \ref memory_stack that is used by the \ref temporary_allocator. /// There should be at least one per-thread. - /// \ingroup allocator + /// \ingroup memory_allocator class temporary_stack : WPI_EBO(detail::temporary_stack_list_node) { public: @@ -209,13 +209,13 @@ namespace wpi temporary_stack& get_temporary_stack( std::size_t initial_size = temporary_stack_initializer::default_stack_size); - /// A stateful \concept{concept_rawallocator,RawAllocator} that handles temporary allocations. + /// A stateful RawAllocator that handles temporary allocations. /// It works similar to \c alloca() but uses a seperate \ref memory_stack for the allocations, /// instead of the actual program stack. /// This avoids the stack overflow error and is portable, /// with a similar speed. /// All allocations done in the scope of the allocator object are automatically freed when the object is destroyed. - /// \ingroup allocator + /// \ingroup memory_allocator class temporary_allocator { public: @@ -267,7 +267,7 @@ namespace wpi /// Specialization of the \ref allocator_traits for \ref temporary_allocator classes. /// \note It is not allowed to mix calls through the specialization and through the member functions, /// i.e. \ref temporary_allocator::allocate() and this \c allocate_node(). - /// \ingroup allocator + /// \ingroup memory_allocator template <> class allocator_traits { diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/threading.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/threading.hpp index 82629ec7b7..73a107392c 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/threading.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/threading.hpp @@ -22,7 +22,7 @@ namespace wpi { /// A dummy \c Mutex class that does not lock anything. /// It is a valid \c Mutex and can be used to disable locking anywhere a \c Mutex is requested. - /// \ingroup core + /// \ingroup memory_core struct no_mutex { void lock() noexcept {} @@ -35,11 +35,11 @@ namespace wpi void unlock() noexcept {} }; - /// Specifies whether or not a \concept{concept_rawallocator,RawAllocator} is thread safe as-is. + /// Specifies whether or not a RawAllocator is thread safe as-is. /// This allows to use \ref no_mutex as an optimization. /// Note that stateless allocators are implictly thread-safe. /// Specialize it only for your own stateful allocators. - /// \ingroup core + /// \ingroup memory_core template struct is_thread_safe_allocator : std::integral_constant::is_stateful::value> diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/tracking.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/tracking.hpp index 4742a4cef4..4ef69c0efa 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/tracking.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/tracking.hpp @@ -69,12 +69,12 @@ namespace wpi }; } // namespace detail - /// A \concept{concept_blockallocator,BlockAllocator} adapter that tracks another allocator using a \concept{concept_tracker,tracker}. - /// It wraps another \concept{concept_blockallocator,BlockAllocator} and calls the tracker function before forwarding to it. - /// The class can then be used anywhere a \concept{concept_blockallocator,BlockAllocator} is required and the memory usage will be tracked.
+ /// A BlockAllocator adapter that tracks another allocator using a tracker. + /// It wraps another BlockAllocator and calls the tracker function before forwarding to it. + /// The class can then be used anywhere a BlockAllocator is required and the memory usage will be tracked.
/// It will only call the on_allocator_growth() and on_allocator_shrinking() tracking functions, - /// since a \concept{concept_blockallocator,BlockAllocator} is normally used inside higher allocators only. - /// \ingroup adapter + /// since a BlockAllocator is normally used inside higher allocators only. + /// \ingroup memory_adapter template class tracked_block_allocator : WPI_EBO(Tracker, make_block_allocator_t) @@ -84,7 +84,7 @@ namespace wpi using tracker = Tracker; /// @{ - /// \effects Creates it by giving it a \concept{concept_tracker,tracker} and the tracked \concept{concept_rawallocator,RawAllocator}. + /// \effects Creates it by giving it a tracker and the tracked RawAllocator. /// It will embed both objects. explicit tracked_block_allocator(tracker t = {}) noexcept : tracker(detail::move(t)) {} @@ -154,18 +154,18 @@ namespace wpi /// Similar to \ref tracked_block_allocator, but shares the tracker with the higher level allocator. /// This allows tracking both (de-)allocations and growth with one tracker. /// \note Due to implementation reasons, it cannot track growth and shrinking in the constructor/destructor of the higher level allocator. - /// \ingroup adapter + /// \ingroup memory_adapter template using deeply_tracked_block_allocator = WPI_IMPL_DEFINED( detail::deeply_tracked_block_allocator>); - /// A \concept{concept_rawallocator,RawAllocator} adapter that tracks another allocator using a \concept{concept_tracker,tracker}. - /// It wraps another \concept{concept_rawallocator,RawAllocator} and calls the tracker function before forwarding to it. - /// The class can then be used anywhere a \concept{concept_rawallocator,RawAllocator} is required and the memory usage will be tracked.
- /// If the \concept{concept_rawallocator,RawAllocator} uses \ref deeply_tracked_block_allocator as \concept{concept_blockallocator,BlockAllocator}, + /// A RawAllocator adapter that tracks another allocator using a tracker. + /// It wraps another RawAllocator and calls the tracker function before forwarding to it. + /// The class can then be used anywhere a RawAllocator is required and the memory usage will be tracked.
+ /// If the RawAllocator uses \ref deeply_tracked_block_allocator as BlockAllocator, /// it will also track growth and shrinking of the allocator. - /// \ingroup adapter + /// \ingroup memory_adapter template class tracked_allocator : WPI_EBO(Tracker, allocator_traits::allocator_type) @@ -181,7 +181,7 @@ namespace wpi || !std::is_empty::value>; /// @{ - /// \effects Creates it by giving it a \concept{concept_tracker,tracker} and the tracked \concept{concept_rawallocator,RawAllocator}. + /// \effects Creates it by giving it a tracker and the tracked RawAllocator. /// It will embed both objects. /// \note This will never call the Tracker::on_allocator_growth() function. explicit tracked_allocator(tracker t = {}) noexcept @@ -350,7 +350,7 @@ namespace wpi /// @} }; - /// \effects Takes a \concept{concept_rawallocator,RawAllocator} and wraps it with a \concept{concept_tracker,tracker}. + /// \effects Takes a RawAllocator and wraps it with a tracker. /// \returns A \ref tracked_allocator with the corresponding parameters forwarded to the constructor. /// \relates tracked_allocator template @@ -403,16 +403,16 @@ namespace wpi RawAllocator, deeply_tracked_block_allocator_for>::type; } // namespace detail - /// A \ref tracked_allocator that has rebound any \concept{concept_blockallocator,BlockAllocator} to the corresponding \ref deeply_tracked_block_allocator. + /// A \ref tracked_allocator that has rebound any BlockAllocator to the corresponding \ref deeply_tracked_block_allocator. /// This makes it a deeply tracked allocator.
- /// It replaces each template argument of the given \concept{concept_rawallocator,RawAllocator} for which \ref is_block_allocator or \ref is_raw_allocator is \c true with a \ref deeply_tracked_block_allocator. - /// \ingroup adapter + /// It replaces each template argument of the given RawAllocator for which \ref is_block_allocator or \ref is_raw_allocator is \c true with a \ref deeply_tracked_block_allocator. + /// \ingroup memory_adapter template WPI_ALIAS_TEMPLATE( deeply_tracked_allocator, tracked_allocator>); - /// \effects Takes a \concept{concept_rawallocator,RawAllocator} and deeply wraps it with a \concept{concept_tracker,tracker}. + /// \effects Takes a RawAllocator and deeply wraps it with a tracker. /// \returns A \ref deeply_tracked_allocator with the corresponding parameters forwarded to the constructor. /// \relates deeply_tracked_allocator template diff --git a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/virtual_memory.hpp b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/virtual_memory.hpp index 360ca78f4b..020022188c 100644 --- a/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/virtual_memory.hpp +++ b/wpiutil/src/main/native/thirdparty/memory/include/wpi/memory/virtual_memory.hpp @@ -36,14 +36,14 @@ namespace wpi /// The page size of the virtual memory. /// All virtual memory allocations must be multiple of this size. /// It is usually 4KiB. - /// \ingroup allocator + /// \ingroup memory_allocator /// \deprecated use \ref get_virtual_memory_page_size instead. extern const std::size_t virtual_memory_page_size; /// \returns the page size of the virtual memory. /// All virtual memory allocations must be multiple of this size. /// It is usually 4KiB. - /// \ingroup allocator + /// \ingroup memory_allocator std::size_t get_virtual_memory_page_size() noexcept; /// Reserves virtual memory. @@ -52,33 +52,33 @@ namespace wpi /// \returns The address of the first reserved page, /// or \c nullptr in case of error. /// \note The memory may not be used, it must first be commited. - /// \ingroup allocator + /// \ingroup memory_allocator void* virtual_memory_reserve(std::size_t no_pages) noexcept; /// Releases reserved virtual memory. /// \effects Returns previously reserved pages to the system. /// \requires \c pages must come from a previous call to \ref virtual_memory_reserve with the same \c calc_no_pages, /// it must not be \c nullptr. - /// \ingroup allocator + /// \ingroup memory_allocator void virtual_memory_release(void* pages, std::size_t no_pages) noexcept; /// Commits reserved virtual memory. /// \effects Marks \c calc_no_pages pages starting at the given address available for use. /// \returns The beginning of the committed area, i.e. \c memory, or \c nullptr in case of error. /// \requires The memory must be previously reserved. - /// \ingroup allocator + /// \ingroup memory_allocator void* virtual_memory_commit(void* memory, std::size_t no_pages) noexcept; /// Decommits commited virtual memory. /// \effects Puts commited memory back in the reserved state. /// \requires \c memory must come from a previous call to \ref virtual_memory_commit with the same \c calc_no_pages /// it must not be \c nullptr. - /// \ingroup allocator + /// \ingroup memory_allocator void virtual_memory_decommit(void* memory, std::size_t no_pages) noexcept; - /// A stateless \concept{concept_rawallocator,RawAllocator} that allocates memory using the virtual memory allocation functions. + /// A stateless RawAllocator that allocates memory using the virtual memory allocation functions. /// It does not prereserve any memory and will always reserve and commit combined. - /// \ingroup allocator + /// \ingroup memory_allocator class virtual_memory_allocator : WPI_EBO(detail::global_leak_checker) { @@ -94,17 +94,17 @@ namespace wpi return *this; } - /// \effects A \concept{concept_rawallocator,RawAllocator} allocation function. + /// \effects A RawAllocator allocation function. /// It uses \ref virtual_memory_reserve followed by \ref virtual_memory_commit for the allocation. /// The number of pages allocated will be the minimum to hold \c size continuous bytes, /// i.e. \c size will be rounded up to the next multiple. /// If debug fences are activated, one additional page before and after the memory will be allocated. - /// \returns A pointer to a \concept{concept_node,node}, it will never be \c nullptr. + /// \returns A pointer to a node, it will never be \c nullptr. /// It will always be aligned on a fence boundary, regardless of the alignment parameter. /// \throws An exception of type \ref out_of_memory or whatever is thrown by its handler if the allocation fails. void* allocate_node(std::size_t size, std::size_t alignment); - /// \effects A \concept{concept_rawallocator,RawAllocator} deallocation function. + /// \effects A RawAllocator deallocation function. /// It calls \ref virtual_memory_decommit followed by \ref virtual_memory_release for the deallocation. void deallocate_node(void* node, std::size_t size, std::size_t alignment) noexcept; @@ -122,10 +122,10 @@ namespace wpi struct memory_block; struct allocator_info; - /// A \concept{concept_blockallocator,BlockAllocator} that reserves virtual memory and commits it part by part. + /// A BlockAllocator that reserves virtual memory and commits it part by part. /// It is similar to \ref memory_stack but does not support growing and uses virtual memory, /// also meant for big blocks not small allocations. - /// \ingroup allocator + /// \ingroup memory_allocator class virtual_block_allocator { public: