Showing the changes to codec/common/src/memory_align.cpp (1 of 1 file). Show all
Unified · Split
| @@ -130,7 +130,7 @@ void* CMemoryAlign::WelsMalloc (const uint32_t kuiSize, const char* kpTag) { · 129 unmodified lines | ||
| 130 | 130 | void* pPointer = WelsCommon::WelsMalloc (kuiSize, kpTag, m_nCacheLineSize); |
| 131 | 131 | #ifdef MEMORY_MONITOR |
| 132 | 132 | if (pPointer != NULL) { |
| 133 | − const int32_t iMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof ( | |
| 133 | + iMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof ( | |
| 134 | 134 | int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t); |
| 135 | 135 | m_nMemoryUsageInBytes += iMemoryLength; |
| 136 | 136 | } |
| @@ -141,7 +141,7 @@ void* CMemoryAlign::WelsMalloc (const uint32_t kuiSize, const char* kpTag) { · 4 unmodified lines | ||
| 141 | 141 | void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) { |
| 142 | 142 | if (pPointer) { |
| 143 | 143 | #ifdef MEMORY_MONITOR |
| 144 | − const int32_t iMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof ( | |
| 144 | + iMemoryLength = * ((int32_t*) ((uint8_t*)pPointer - sizeof (void**) - sizeof ( | |
| 145 | 145 | int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t); |
| 146 | 146 | m_nMemoryUsageInBytes -= iMemoryLength; |
| 147 | 147 | #endif//MEMORY_MONITOR |