Skip to content

Commit

Permalink
Remove unused AllocateBytesStats (#3632)
Browse files Browse the repository at this point in the history
Summary:
Remove unused AllocateBytesStats

Will add thread-local memory allocation size distribution stats
in followup.

Pull Request resolved: #3632

Reviewed By: mbasmanova

Differential Revision: D42335186

Pulled By: xiaoxmeng

fbshipit-source-id: d63a2185cf1d8108b21be91adbe48b46569185f6
  • Loading branch information
xiaoxmeng authored and facebook-github-bot committed Jan 4, 2023
1 parent 12ea726 commit 33d360f
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions velox/common/memory/MemoryAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,24 +385,6 @@ class MemoryAllocator : public std::enable_shared_from_this<MemoryAllocator> {
uint64_t size_{0};
};

/// Stats on memory allocated by allocateBytes().
struct AllocateBytesStats {
/// Total size of small allocations.
uint64_t totalSmall;
/// Total size of allocations from some size class.
uint64_t totalInSizeClasses;
/// Total in standalone large allocations via allocateContiguous().
uint64_t totalLarge;

AllocateBytesStats operator-(const AllocateBytesStats& other) const {
auto result = *this;
result.totalSmall -= other.totalSmall;
result.totalInSizeClasses -= other.totalInSizeClasses;
result.totalLarge -= other.totalLarge;
return result;
}
};

using ReservationCallback = std::function<void(int64_t, bool)>;

/// Allocates one or more runs that add up to at least 'numPages', with the
Expand Down

0 comments on commit 33d360f

Please sign in to comment.