精華區beta EE_DSnP 關於我們 聯絡資訊
在測試程式的動作 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
ric2k1:"Memory acquired... 0x9264c30" 以及 12/16 23:50
ric2k1:"Recycling 0x9264c30 to (5)" 12/16 23:50
ric2k1:"ret" 與 "r" 都是指 p 前面 4 bytes 12/16 23:51