diff --git a/dart/common/MemoryAllocator.hpp b/dart/common/MemoryAllocator.hpp index 0964c760d4cf2..cae92ab3bf31f 100644 --- a/dart/common/MemoryAllocator.hpp +++ b/dart/common/MemoryAllocator.hpp @@ -62,7 +62,7 @@ class MemoryAllocator : public Castable /// Allocates \c size bytes of uninitialized storage. /// - /// \param[in] bytes: The byte size to allocate sotrage for. + /// \param[in] bytes: The byte size to allocate storage for. /// \return On success, the pointer to the beginning of newly allocated /// memory. /// \return On failure, a null pointer diff --git a/dart/common/MemoryManager.hpp b/dart/common/MemoryManager.hpp index 56d23c9d97d4a..684219f4a8a1d 100644 --- a/dart/common/MemoryManager.hpp +++ b/dart/common/MemoryManager.hpp @@ -42,7 +42,7 @@ namespace dart::common { /// A composite memory allocator that contains various memory allocators that /// are optimized for different use cases. -class MemoryManager final : public MemoryAllocator +class MemoryManager : public MemoryAllocator { public: /// Type of the memory allocators @@ -80,18 +80,18 @@ class MemoryManager final : public MemoryAllocator /// Allocates \c size bytes of uninitialized storage. /// /// \param[in] type: The memory allocator type. - /// \param[in] bytes: The byte size to allocate sotrage for. + /// \param[in] bytes: The byte size to allocate storage for. /// \return On success, the pointer to the beginning of newly allocated /// memory. /// \return On failure, a null pointer [[nodiscard]] void* allocate(Type type, size_t bytes); /// Allocates using base allocator - [[nodiscard]] void* allocate(size_t bytes) noexcept final; + [[nodiscard]] void* allocate(size_t bytes) noexcept override; /// Allocates \c size bytes of uninitialized storage using FreeListAllocator. /// - /// \param[in] bytes: The byte size to allocate sotrage for. + /// \param[in] bytes: The byte size to allocate storage for. /// \return On success, the pointer to the beginning of newly allocated /// memory. /// \return On failure, a null pointer @@ -99,7 +99,7 @@ class MemoryManager final : public MemoryAllocator /// Allocates \c size bytes of uninitialized storage using PoolAllocator. /// - /// \param[in] bytes: The byte size to allocate sotrage for. + /// \param[in] bytes: The byte size to allocate storage for. /// \return On success, the pointer to the beginning of newly allocated /// memory. /// \return On failure, a null pointer @@ -115,7 +115,7 @@ class MemoryManager final : public MemoryAllocator // TODO(JS): Make this constexpr once migrated to C++20 /// Deallocates using base allocator - void deallocate(void* pointer, size_t bytes) final; + void deallocate(void* pointer, size_t bytes) override; void deallocateUsingFree(void* pointer, size_t bytes); diff --git a/dart/common/StlAllocator.hpp b/dart/common/StlAllocator.hpp index 99ee9b47af2fe..047a3df134f53 100644 --- a/dart/common/StlAllocator.hpp +++ b/dart/common/StlAllocator.hpp @@ -73,7 +73,7 @@ class StlAllocator : public std::allocator /// Allocates n * sizeof(T) bytes of uninitialized storage. /// - /// \param[in] n: The number of objects to allocate sotrage for. + /// \param[in] n: The number of objects to allocate storage for. /// \param[in] hint: Point to a nearby memory location. /// \return On success, the pointer to the beginning of newly allocated /// memory.