作者ric2k1 (Ric)
看板EE_DSnP
標題Re: [問題] debug訊息
時間Sun Apr 27 20:37:08 2008
※ 引述《lendlicewang (鴛刀鴦刀情人看刀)》之銘言:
: 這邊是不是怪怪的
: 這邊是do1的指令
: mtest> mtdel -r 2 -a
: Calling freeArr...(0x92cae50)
: Recycling 0x92cae50 to _recycleList[3]
: Calling freeArr...(0x92cae78)
: Recycling 0x92cae78 to _recycleList[3]
: 但是在memMgr.h中( void freeArr(T* p) )
: 程式碼是這樣的
: #ifdef MEM_DEBUG
: cout << ">> Array size = " << n << endl;
: #endif // MEM_DEBUG
: T* r; // ...
: #ifdef MEM_DEBUG
: cout << "Recycling " << r << " to (" << n << ")" << endl;
: #endif // MEM_DEBUG
: 不過好像也只是無關緊要的小bug
我這行改錯版本了...
請將:
cout << "Recycling " << r << " to (" << n << ")" << endl;
改成:
cout << "Recycling " << r << " to _recycleList[" << n << "]" << endl;
當然, 不改也沒關係, 我們在改作業時是不會比對 debug message 的!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.121.132.230