From 02dca9d39e3010d65893db1f9715a7af6356e63c Mon Sep 17 00:00:00 2001 From: aditi-pandit Date: Mon, 1 Jul 2024 14:44:26 -0700 Subject: [PATCH] Fix spellings in MemoryAllocator code (#10350) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/10350 Reviewed By: tanjialiang Differential Revision: D59232726 Pulled By: xiaoxmeng fbshipit-source-id: 663ff3163460adddd5b55a46e09996cc07d4fc83 --- velox/common/memory/Memory.h | 2 +- velox/common/memory/MemoryAllocator.cpp | 2 +- velox/common/memory/MemoryAllocator.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/velox/common/memory/Memory.h b/velox/common/memory/Memory.h index fa5c5cec0814..2429d9a0a742 100644 --- a/velox/common/memory/Memory.h +++ b/velox/common/memory/Memory.h @@ -92,7 +92,7 @@ struct MemoryManagerOptions { /// std::malloc. bool useMmapAllocator{false}; - // Number of pages in largest size class in MmapAllocator. + // Number of pages in the largest size class in MmapAllocator. int32_t largestSizeClassPages{256}; /// If true, allocations larger than largest size class size will be delegated diff --git a/velox/common/memory/MemoryAllocator.cpp b/velox/common/memory/MemoryAllocator.cpp index 56cf3b6ce773..2dd22b2ff577 100644 --- a/velox/common/memory/MemoryAllocator.cpp +++ b/velox/common/memory/MemoryAllocator.cpp @@ -310,7 +310,7 @@ bool MemoryAllocator::growContiguous( return true; } if (reservationCB != nullptr) { - // May throw. If does, there is nothing to revert. + // May throw. If it does, there is nothing to revert. reservationCB(AllocationTraits::pageBytes(increment), true); } bool success = false; diff --git a/velox/common/memory/MemoryAllocator.h b/velox/common/memory/MemoryAllocator.h index 704aa23b4563..f8b2d4dfd21f 100644 --- a/velox/common/memory/MemoryAllocator.h +++ b/velox/common/memory/MemoryAllocator.h @@ -140,7 +140,7 @@ struct Stats { class MemoryAllocator; -/// A general cache interface using 'MemroyAllocator' to allocate memory, that +/// A general cache interface using 'MemoryAllocator' to allocate memory, that /// is also able to free up memory upon request by shrinking itself. class Cache { public: @@ -173,7 +173,7 @@ class Cache { void setCacheFailureMessage(std::string message); /// Returns and clears a thread local message set with -/// setCacheFailuremessage(). +/// setCacheFailureMessage(). std::string getAndClearCacheFailureMessage(); /// This class provides interface for the actual memory allocations from memory @@ -198,7 +198,7 @@ class MemoryAllocator : public std::enable_shared_from_this { kMalloc, /// The memory allocator kind which is implemented by MmapAllocator. It /// manages the large chunk of memory allocations on its own by leveraging - /// mmap and madvice, to optimize the memory fragmentation in the long + /// mmap and madvise, to optimize the memory fragmentation in the long /// running service such as Prestissimo. kMmap, };