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 | void* pPointer = WelsCommon::WelsMalloc (kuiSize, kpTag, m_nCacheLineSize); | 130 | void* pPointer = WelsCommon::WelsMalloc (kuiSize, kpTag, m_nCacheLineSize); |
| 131 | #ifdef MEMORY_MONITOR | 131 | #ifdef MEMORY_MONITOR |
| 132 | if (pPointer != NULL) { | 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 | int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t); | 134 | int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t); |
| 135 | m_nMemoryUsageInBytes += iMemoryLength; | 135 | m_nMemoryUsageInBytes += iMemoryLength; |
| 136 | } | 136 | } |
| @@ -141,7 +141,7 @@ void* CMemoryAlign::WelsMalloc (const uint32_t kuiSize, const char* kpTag) { · 4 unmodified lines | |||
| 141 | void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) { | 141 | void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) { |
| 142 | if (pPointer) { | 142 | if (pPointer) { |
| 143 | #ifdef MEMORY_MONITOR | 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 | int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t); | 145 | int32_t))) + m_nCacheLineSize - 1 + sizeof (void**) + sizeof (int32_t); |
| 146 | m_nMemoryUsageInBytes -= iMemoryLength; | 146 | m_nMemoryUsageInBytes -= iMemoryLength; |
| 147 | #endif//MEMORY_MONITOR | 147 | #endif//MEMORY_MONITOR |