Skip to content

Commit

Permalink
Fix spellings in MemoryAllocator code (facebookincubator#10350)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: facebookincubator#10350

Reviewed By: tanjialiang

Differential Revision: D59232726

Pulled By: xiaoxmeng

fbshipit-source-id: 663ff3163460adddd5b55a46e09996cc07d4fc83
  • Loading branch information
aditi-pandit authored and facebook-github-bot committed Jul 1, 2024
1 parent a442baa commit 02dca9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion velox/common/memory/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion velox/common/memory/MemoryAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions velox/common/memory/MemoryAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -198,7 +198,7 @@ class MemoryAllocator : public std::enable_shared_from_this<MemoryAllocator> {
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,
};
Expand Down

0 comments on commit 02dca9d

Please sign in to comment.