[請益] freeArr 中的 p 和 r

看板EE_DSnP作者 (交程式? 停修單?)時間17年前 (2006/12/16 23:19), 編輯推噓2(201)
留言3則, 1人參與, 最新討論串1/1
在測試程式的動作 mtest> mtn 1 -a 5 Calling allocArr...(64) Calling MemMgr::getMem...(64) Memory acquired... 0x9264c30 mtest> mtd -i 0 -a Calling freeArr...(0x9264c30) >> Array size = 5 Recycling 0x9264c30 to (5) 下面是 code 對應的部分 ( 但 r 不是應該在 p 前面 4 bytes 嗎 ? 還是我搞錯了@@) cout << "Calling freeArr...(" << p << ")" << endl; // 2. Get 'r' which points to the beginning of the memory element and // is the memory address to recycle cout << "Recycling " << r << " to (" << n << ")" << endl; -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.87.129.152

12/16 23:50, , 1F
"Memory acquired... 0x9264c30" 以及
12/16 23:50, 1F

12/16 23:50, , 2F
"Recycling 0x9264c30 to (5)"
12/16 23:50, 2F

12/16 23:51, , 3F
"ret" 與 "r" 都是指 p 前面 4 bytes
12/16 23:51, 3F
文章代碼(AID): #15X0vjad (EE_DSnP)