mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Remove unused Memory::alloc_count.
This commit is contained in:
parent
28089c40c1
commit
af7610576a
2 changed files with 0 additions and 8 deletions
|
|
@ -62,8 +62,6 @@ SafeNumeric<uint64_t> Memory::mem_usage;
|
||||||
SafeNumeric<uint64_t> Memory::max_usage;
|
SafeNumeric<uint64_t> Memory::max_usage;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SafeNumeric<uint64_t> Memory::alloc_count;
|
|
||||||
|
|
||||||
void *Memory::alloc_aligned_static(size_t p_bytes, size_t p_alignment) {
|
void *Memory::alloc_aligned_static(size_t p_bytes, size_t p_alignment) {
|
||||||
DEV_ASSERT(is_power_of_2(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);
|
ERR_FAIL_NULL_V(mem, nullptr);
|
||||||
|
|
||||||
alloc_count.increment();
|
|
||||||
|
|
||||||
if (prepad) {
|
if (prepad) {
|
||||||
uint8_t *s8 = (uint8_t *)mem;
|
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;
|
bool prepad = p_pad_align;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
alloc_count.decrement();
|
|
||||||
|
|
||||||
if (prepad) {
|
if (prepad) {
|
||||||
mem -= DATA_OFFSET;
|
mem -= DATA_OFFSET;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,6 @@ class Memory {
|
||||||
static SafeNumeric<uint64_t> max_usage;
|
static SafeNumeric<uint64_t> max_usage;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static SafeNumeric<uint64_t> alloc_count;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Alignment: ↓ max_align_t ↓ uint64_t ↓ max_align_t
|
// Alignment: ↓ max_align_t ↓ uint64_t ↓ max_align_t
|
||||||
// ┌─────────────────┬──┬────────────────┬──┬───────────...
|
// ┌─────────────────┬──┬────────────────┬──┬───────────...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue