From af7610576ad058e3cbefd45ea6bc47f491d2b29e Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Fri, 25 Apr 2025 21:44:26 +0200 Subject: [PATCH] Remove unused `Memory::alloc_count`. --- core/os/memory.cpp | 6 ------ core/os/memory.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/core/os/memory.cpp b/core/os/memory.cpp index 3d3b03926c6..446e8cc0ada 100644 --- a/core/os/memory.cpp +++ b/core/os/memory.cpp @@ -62,8 +62,6 @@ SafeNumeric Memory::mem_usage; SafeNumeric Memory::max_usage; #endif -SafeNumeric Memory::alloc_count; - void *Memory::alloc_aligned_static(size_t p_bytes, size_t p_alignment) { DEV_ASSERT(is_power_of_2(p_alignment)); @@ -107,8 +105,6 @@ void *Memory::alloc_static(size_t p_bytes, bool p_pad_align) { ERR_FAIL_NULL_V(mem, nullptr); - alloc_count.increment(); - if (prepad) { uint8_t *s8 = (uint8_t *)mem; @@ -186,8 +182,6 @@ void Memory::free_static(void *p_ptr, bool p_pad_align) { bool prepad = p_pad_align; #endif - alloc_count.decrement(); - if (prepad) { mem -= DATA_OFFSET; diff --git a/core/os/memory.h b/core/os/memory.h index 7efa85e7f47..3e0bf88217f 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -43,8 +43,6 @@ class Memory { static SafeNumeric max_usage; #endif - static SafeNumeric alloc_count; - public: // Alignment: ↓ max_align_t ↓ uint64_t ↓ max_align_t // ┌─────────────────┬──┬────────────────┬──┬───────────...