History

move the printing of MEMORY_CHECK part to more reasonable

sijchen committed 10 years ago

Commit 71aa5331 parent 6a0f0811 file · +3 −4Browse 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+3−4
@@ -70,6 +70,9 @@ void* WelsMalloc (const uint32_t kuiSize, const char* kpTag, const uint32_t kiAl · 69 unmodified lines
70 const uint32_t kiPayloadSize = kuiSize;70 const uint32_t kiPayloadSize = kuiSize;
71 71
72 uint8_t* pBuf = (uint8_t*) malloc (kiActualRequestedSize);72 uint8_t* pBuf = (uint8_t*) malloc (kiActualRequestedSize);
73 if (NULL == pBuf)
74 return NULL;
75
73#ifdef MEMORY_CHECK76#ifdef MEMORY_CHECK
74 if (fpMemChkPoint == NULL) {77 if (fpMemChkPoint == NULL) {
75 fpMemChkPoint = fopen ("./enc_mem_check_point.txt", "at+");78 fpMemChkPoint = fopen ("./enc_mem_check_point.txt", "at+");
@@ -87,10 +90,6 @@ void* WelsMalloc (const uint32_t kuiSize, const char* kpTag, const uint32_t kiAl · 11 unmodified lines
87 }90 }
88#endif91#endif
89 uint8_t* pAlignedBuffer;92 uint8_t* pAlignedBuffer;
90
91 if (NULL == pBuf)
92 return NULL;
93
94 pAlignedBuffer = pBuf + kiAlignedBytes + kiSizeOfVoidPointer + kiSizeOfInt;93 pAlignedBuffer = pBuf + kiAlignedBytes + kiSizeOfVoidPointer + kiSizeOfInt;
95 pAlignedBuffer -= ((uintptr_t) pAlignedBuffer & kiAlignedBytes);94 pAlignedBuffer -= ((uintptr_t) pAlignedBuffer & kiAlignedBytes);
96 * ((void**) (pAlignedBuffer - kiSizeOfVoidPointer)) = pBuf;95 * ((void**) (pAlignedBuffer - kiSizeOfVoidPointer)) = pBuf;

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