History

add byte info in free

Sijia Chen committed 11 years ago

Commit 89d5ad21 parent 4fb4c951 file · +2 −2Browse files

Showing the changes to codec/common/src/memory_align.cpp (1 of 1 file). Show all

Unified · Split

codec/common/src/memory_align.cpp+2−2
@@ -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_MONITOR131#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
141void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) {141void CMemoryAlign::WelsFree (void* pPointer, const char* kpTag) {
142 if (pPointer) {142 if (pPointer) {
143#ifdef MEMORY_MONITOR143#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_MONITOR147#endif//MEMORY_MONITOR

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t