Rename INVALID_OFFSET to kInvalidOffset.
BUG=dawn:27
Change-Id: Ida590a2b3cf3da17bbedf6ef61d72eaaa443bc4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11561
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/BuddyAllocator.h b/src/dawn_native/BuddyAllocator.h
index c613375..af82636 100644
--- a/src/dawn_native/BuddyAllocator.h
+++ b/src/dawn_native/BuddyAllocator.h
@@ -22,9 +22,7 @@
namespace dawn_native {
- static constexpr uint64_t INVALID_OFFSET = std::numeric_limits<uint64_t>::max();
-
- // Buddy allocator uses the buddy memory allocation technique to satisify an allocation request.
+ // Buddy allocator uses the buddy memory allocation technique to satisfy an allocation request.
// Memory is split into halves until just large enough to fit to the request. This
// requires the allocation size to be a power-of-two value. The allocator "allocates" a block by
// returning the starting offset whose size is guaranteed to be greater than or equal to the
@@ -47,6 +45,8 @@
// For testing purposes only.
uint64_t ComputeTotalNumOfFreeBlocksForTesting() const;
+ static constexpr uint64_t kInvalidOffset = std::numeric_limits<uint64_t>::max();
+
private:
uint32_t ComputeLevelFromBlockSize(uint64_t blockSize) const;
uint64_t GetNextFreeAlignedBlock(size_t allocationBlockLevel, uint64_t alignment) const;